RyotaUshio / obsidian-pdf-plus

PDF++: The most Obsidian-native PDF annotation, viewing & editing tool ever. Comes with optional Vim keybindings.
https://ryotaushio.github.io/obsidian-pdf-plus/
MIT License
809 stars 15 forks source link

[Bug] Invisible boundaries of the rectangular area on the PDF #67

Closed math-feng closed 8 months ago

math-feng commented 8 months ago

Steps to reproduce

please watch the GIF below

Expected behavior

The rectangular area on the PDF should be colored and have a backlink icon.

Actual behavior

nothing

Screen recordings or screenshots

Obsidian_24_03_01_59

Obsidian debug info

SYSTEM INFO: Obsidian version: v1.5.8 Installer version: v1.5.3 Operating system: Windows 10 Home China 10.0.22635 Login status: not logged in Insider build toggle: off Live preview: on Base theme: adapt to system Community theme: Things v2.1.20 Snippets enabled: 8 Restricted mode: off Plugins installed: 55 Plugins enabled: 53 1: Dataview v0.5.64 2: Paste URL into selection v1.7.0 3: Recent Files v1.3.10 4: Tasks v6.0.0 5: Zotero Integration v3.1.7 6: Style Settings v1.0.7 7: Auto Link Title v1.5.3 8: Latex Suite v1.9.1 9: Note Refactor v1.8.2 10: Clear Unused Images v1.1.0 11: Copy Block Link v1.0.4 12: Hover Editor v0.11.17 13: Folder notes v1.7.14 14: Git v2.23.2 15: Checklist v2.2.13 16: Tasks Calendar Wrapper v0.2.9 17: Sortable v0.3.1 18: Remotely Save v0.3.40 19: Plugin Groups v2.1.0 20: Image2LaTEX v1.0.4 21: Tag Wrangler v0.6.1 22: Weread v0.9.0 23: BRAT v0.8.4 24: LaTeX-like Theorem & Equation Referencer v2.2.0 25: Auto-\displaystyle Inline Math v0.2.2 26: Better Math in Callouts & Blockquotes v0.3.7 27: Rendered Block Link Suggestions v0.5.0 28: Strange New Worlds (SNW) v1.2.5 29: No more flickering inline math v0.3.4 30: Hider v1.3.1 31: Quick Preview v0.6.0 32: File Cooker v1.8.1 33: Linter v1.23.1 34: Templater v2.2.1 35: Scroll to Top v2.1.4 36: Auto Hide v0.4.7 37: MathLinks v0.5.3 38: Share Note v0.8.7 39: Daily note creator v1.0.0 40: Status Bar Organizer v1.3.0 41: Opener v2.1.2 42: File Tree Alternative v2.4.8 43: Advanced Paste v2.7.0 44: Advanced Tables v0.21.0 45: Remember cursor position v1.0.8 46: Media Extended v3.0.2 47: Image Context Menus v1.6.0 48: floating toc v2.4.6 49: Various Complements v9.4.0 50: Hypothes.is v0.1.19 51: PDF++ v0.37.0-beta6 52: Admonition v10.2.0 53: Easy Typing v5.2.0

RECOMMENDATIONS: Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets. Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

PDF++ debug info

{
    "settings": {
        "displayTextFormats": [
            {
                "name": "Obsidian default",
                "template": "{{file.basename}}, page {{page}}"
            },
            {
                "name": "Title & page",
                "template": "{{file.basename}}, p.{{pageLabel}}"
            },
            {
                "name": "Page only",
                "template": "p.{{pageLabel}}"
            },
            {
                "name": "Text",
                "template": "{{text}}"
            }
        ],
        "defaultDisplayTextFormatIndex": 0,
        "syncDisplayTextFormat": true,
        "syncDefaultDisplayTextFormat": false,
        "copyCommands": [
            {
                "name": "Quote",
                "template": "> ({{linkWithDisplay}})\n> {{selection}}\n"
            },
            {
                "name": "Link only",
                "template": "{{linkWithDisplay}}"
            },
            {
                "name": "Embed",
                "template": "!{{link}}"
            },
            {
                "name": "Callout",
                "template": "> [!{{calloutType}}|{{colorName}}] {{linkWithDisplay}}\n> {{text}}\n"
            },
            {
                "name": "Quote in callout",
                "template": "> [!{{calloutType}}|{{colorName}}] {{linkWithDisplay}}\n> > {{text}}\n> \n> "
            },
            {
                "name": "Create new note",
                "template": "{{app.vault.create(text + \".md\", linkWithDisplay).then((file) => app.workspace.getLeaf(true).openFile(file)), \"\"}}"
            }
        ],
        "useAnotherCopyTemplateWhenNoSelection": false,
        "copyTemplateWhenNoSelection": "{{linkToPageWithDisplay}}",
        "trimSelectionEmbed": true,
        "embedMargin": 50,
        "noSidebarInEmbed": true,
        "noSpreadModeInEmbed": true,
        "embedUnscrollable": false,
        "singleTabForSinglePDF": true,
        "highlightExistingTab": false,
        "existingTabHighlightOpacity": 0.5,
        "existingTabHighlightDuration": 0.75,
        "paneTypeForFirstPDFLeaf": "",
        "openLinkNextToExistingPDFTab": true,
        "openPDFWithDefaultApp": false,
        "openPDFWithDefaultAppAndObsidian": true,
        "focusObsidianAfterOpenPDFWithDefaultApp": true,
        "syncWithDefaultApp": false,
        "dontActivateAfterOpenPDF": true,
        "dontActivateAfterOpenMD": true,
        "highlightDuration": 0.75,
        "noTextHighlightsInEmbed": false,
        "noAnnotationHighlightsInEmbed": true,
        "persistentTextHighlightsInEmbed": true,
        "persistentAnnotationHighlightsInEmbed": false,
        "highlightBacklinks": true,
        "dblclickEmbedToOpenLink": true,
        "highlightBacklinksPane": true,
        "highlightOnHoverBacklinkPane": true,
        "backlinkHoverColor": "",
        "colors": {
            "Yellow": "#ffd000",
            "Red": "#EA5252",
            "Note": "#086ddd",
            "Important": "#bb61e5"
        },
        "defaultColor": "",
        "defaultColorPaletteItemIndex": 0,
        "syncColorPaletteItem": true,
        "syncDefaultColorPaletteItem": false,
        "colorPaletteInToolbar": true,
        "noColorButtonInColorPalette": true,
        "colorPaletteInEmbedToolbar": false,
        "showStatusInToolbar": true,
        "highlightColorSpecifiedOnly": false,
        "doubleClickHighlightToOpenBacklink": true,
        "hoverHighlightAction": "preview",
        "paneTypeForFirstMDLeaf": "right",
        "singleMDLeafInSidebar": true,
        "alwaysUseSidebar": true,
        "defaultColorPaletteActionIndex": 4,
        "syncColorPaletteAction": true,
        "syncDefaultColorPaletteAction": false,
        "proxyMDProperty": "PDF",
        "hoverPDFLinkToOpen": false,
        "ignoreHeightParamInPopoverPreview": true,
        "filterBacklinksByPageDefault": true,
        "showBacklinkToPage": true,
        "enableHoverPDFInternalLink": true,
        "recordPDFInternalLinkHistory": true,
        "alwaysRecordHistory": true,
        "renderMarkdownInStickyNote": true,
        "enablePDFEdit": false,
        "author": "",
        "writeHighlightToFileOpacity": 0.2,
        "defaultWriteFileToggle": false,
        "syncWriteFileToggle": true,
        "syncDefaultWriteFileToggle": false,
        "enableAnnotationDeletion": true,
        "warnEveryAnnotationDelete": false,
        "warnBacklinkedAnnotationDelete": true,
        "enableAnnotationContentEdit": true,
        "enableEditEncryptedPDF": false,
        "pdfLinkColor": "#04a802",
        "pdfLinkBorder": false,
        "replaceContextMenu": true,
        "executeBuiltinCommandForOutline": true,
        "executeBuiltinCommandForZoom": true,
        "executeFontSizeAdjusterCommand": true,
        "closeSidebarWithShowCommandIfExist": true,
        "outlineDrag": true,
        "outlineContextMenu": true,
        "outlineLinkDisplayTextFormat": "{{file.basename}}, {{text}}",
        "outlineLinkCopyFormat": "{{linkWithDisplay}}",
        "recordHistoryOnOutlineClick": true,
        "popoverPreviewOnOutlineHover": true,
        "thumbnailDrag": true,
        "thumbnailContextMenu": true,
        "thumbnailLinkDisplayTextFormat": "{{file.basename}}, page {{pageLabel}}",
        "thumbnailLinkCopyFormat": "{{linkWithDisplay}}",
        "recordHistoryOnThumbnailClick": true,
        "popoverPreviewOnThumbnailHover": true,
        "annotationPopupDrag": true,
        "useCallout": true,
        "calloutType": "PDF",
        "calloutIcon": "highlighter",
        "highlightBacklinksInEmbed": false,
        "highlightBacklinksInHoverPopover": false,
        "highlightBacklinksInCanvas": true,
        "clickPDFInternalLinkWithModifierKey": true,
        "clickOutlineItemWithModifierKey": true,
        "clickThumbnailWithModifierKey": true,
        "focusEditorAfterAutoPaste": true,
        "autoFocus": false,
        "autoFocusTarget": "last-active-and-open-then-last-paste",
        "autoPasteTarget": "last-active-and-open-then-last-paste",
        "openAutoFocusTargetIfNotOpened": true,
        "howToOpenAutoFocusTargetIfNotOpened": "right",
        "closeHoverEditorWhenLostFocus": true,
        "closeSidebarWhenLostFocus": true,
        "openAutoFocusTargetInEditingView": true,
        "executeCommandWhenTargetNotIdentified": true,
        "commandToExecuteWhenTargetNotIdentified": "pdf-plus:create-new-note",
        "selectToCopyToggleRibbonIcon": true,
        "autoFocusToggleRibbonIcon": true,
        "viewSyncFollowPageNumber": true,
        "viewSyncPageDebounceInterval": 0.3,
        "openAfterExtractPages": true,
        "howToOpenExtractedPDF": "tab",
        "warnEveryPageDelete": false,
        "warnBacklinkedPageDelete": true,
        "extractPageInPlace": false,
        "askExtractPageInPlace": true,
        "pageLabelUpdateWhenInsertPage": "keep",
        "pageLabelUpdateWhenDeletePage": "keep",
        "pageLabelUpdateWhenExtractPage": "keep",
        "askPageLabelUpdateWhenInsertPage": true,
        "askPageLabelUpdateWhenDeletePage": true,
        "askPageLabelUpdateWhenExtractPage": true,
        "copyOutlineAsListFormat": "{{linkWithDisplay}}",
        "copyOutlineAsListDisplayTextFormat": "{{text}}",
        "copyOutlineAsHeadingsFormat": "{{text}}\n\n{{linkWithDisplay}}",
        "copyOutlineAsHeadingsDisplayTextFormat": "p.{{pageLabel}}",
        "copyOutlineAsHeadingsMinLevel": 2,
        "newFileNameFormat": "",
        "newFileTemplatePath": "",
        "newPDFLocation": "current",
        "newPDFFolderPath": "",
        "rectEmbedStaticImage": false,
        "rectImageFormat": "file",
        "rectImageExtension": "webp",
        "backlinkIconSize": 50,
        "showBacklinkIconForSelection": true,
        "showBacklinkIconForAnnotation": true,
        "showBacklinkIconForOffset": true,
        "showBacklinkIconForRect": true,
        "showBoundingRectForBacklinkedAnnot": false
    },
    "styleSheet": ".pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight)[data-highlight-color=\"yellow\"],\n.pdf-embed[data-highlight-color=\"yellow\"] .textLayer .mod-focused {\n    --pdf-plus-color: #ffd000;\n    --pdf-plus-backlink-icon-color: #ffd000;\n    --pdf-plus-rect-color: #ffd000;\n}\n.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight)[data-highlight-color=\"red\"],\n.pdf-embed[data-highlight-color=\"red\"] .textLayer .mod-focused {\n    --pdf-plus-color: #EA5252;\n    --pdf-plus-backlink-icon-color: #EA5252;\n    --pdf-plus-rect-color: #EA5252;\n}\n.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight)[data-highlight-color=\"note\"],\n.pdf-embed[data-highlight-color=\"note\"] .textLayer .mod-focused {\n    --pdf-plus-color: #086ddd;\n    --pdf-plus-backlink-icon-color: #086ddd;\n    --pdf-plus-rect-color: #086ddd;\n}\n.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight)[data-highlight-color=\"important\"],\n.pdf-embed[data-highlight-color=\"important\"] .textLayer .mod-focused {\n    --pdf-plus-color: #bb61e5;\n    --pdf-plus-backlink-icon-color: #bb61e5;\n    --pdf-plus-rect-color: #bb61e5;\n}\n.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight) {\n    --pdf-plus-color: rgb(var(--text-highlight-bg-rgb));\n    --pdf-plus-backlink-icon-color: rgb(var(--text-highlight-bg-rgb));\n    --pdf-plus-rect-color: rgb(var(--text-highlight-bg-rgb));\n}\n.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.hovered-highlight {\n\t--pdf-plus-color: green;\n\t--pdf-plus-backlink-icon-color: green;\n   --pdf-plus-rect-color: green;\n}\n.pdf-plus-color-palette-item[data-highlight-color=\"yellow\"] > .pdf-plus-color-palette-item-inner {\n    background-color: #ffd000;\n}\n.pdf-plus-color-palette-item[data-highlight-color=\"red\"] > .pdf-plus-color-palette-item-inner {\n    background-color: #EA5252;\n}\n.pdf-plus-color-palette-item[data-highlight-color=\"note\"] > .pdf-plus-color-palette-item-inner {\n    background-color: #086ddd;\n}\n.pdf-plus-color-palette-item[data-highlight-color=\"important\"] > .pdf-plus-color-palette-item-inner {\n    background-color: #bb61e5;\n}\n.pdf-plus-color-palette-item:not([data-highlight-color]) > .pdf-plus-color-palette-item-inner {\n    background-color: transparent;\n}\n.workspace-leaf.pdf-plus-link-opened.is-highlighted::before {\n\topacity: 0.5;\n}\nbody {\n    --pdf-plus-yellow-rgb: 255, 208, 0\n}\nbody {\n    --pdf-plus-red-rgb: 234, 82, 82\n}\nbody {\n    --pdf-plus-note-rgb: 8, 109, 221\n}\nbody {\n    --pdf-plus-important-rgb: 187, 97, 229\n}\nbody {\n    --pdf-plus-default-color-rgb: var(--text-highlight-bg-rgb)\n}\n.callout[data-callout=\"pdf\"][data-callout-metadata=\"yellow\"] {\n\t--callout-color: var(--pdf-plus-yellow-rgb);\n   background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))\n}\n.callout[data-callout=\"pdf\"][data-callout-metadata=\"red\"] {\n\t--callout-color: var(--pdf-plus-red-rgb);\n   background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))\n}\n.callout[data-callout=\"pdf\"][data-callout-metadata=\"note\"] {\n\t--callout-color: var(--pdf-plus-note-rgb);\n   background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))\n}\n.callout[data-callout=\"pdf\"][data-callout-metadata=\"important\"] {\n\t--callout-color: var(--pdf-plus-important-rgb);\n   background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))\n}\n.callout[data-callout=\"pdf\"] {\n\t--callout-color: var(--pdf-plus-default-color-rgb);\n   background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))\n}\n.callout[data-callout=\"pdf\"] {\n   --callout-icon: lucide-highlighter;\n}"
}
RyotaUshio commented 8 months ago

Thank you for resending the issue!

please watch the GIF below

The attached image seems to be a PNG, not a GIF. Can you update it? FYI, you can attach a video without converting it to a GIF on GitHub.

math-feng commented 8 months ago

you are welcome! Update. you are an awesome developer!

RyotaUshio commented 8 months ago

Thanks now it's very clear.

If so, I'm not 100% sure but this might be a CSS issue.

Does the problem happen in the sandbox vault where

(The sandbox vault can be opened by running the command "Open sandbox vault"; again, the command name can vary depending on the language setting)

RyotaUshio commented 8 months ago

Plus, does the backlink highlighting feature work for text selections? I mean, when you copy a link to a text selection in the PDF viewer and then paste it to a markdown file, is the text selection properly highlighted?

math-feng commented 8 months ago

The problem no longer exists at the moment, thank you very much for your time!

RyotaUshio commented 8 months ago

Wow that's great news! Thanks for letting me know:)