You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MD version import silently drops annotations of linked, non-asset pdfs #923
I wanted to do the switch to DB version but I noticed all annotations for my externally linked PDFs were lost during import. I use that feature extensively. On Discord noone seemed to know either.
Reproduce the Bug
Reproduce:
In the md version link a pdf in the filesystem somewhere outside of the assets folder via 
highlight and annotate
import to db version in the desktop app (latest nightly)
navigate to the link and open it
click on the annotations page
Results
PDF still opens
annotations lost (not only the link is broken, the entire page is lost)
essentially my entire bachelor's modules notes are gone (highlights, references to it)
Expected Behavior
Expected results
in a first step warn about highlights pages in the asset folder with no matching PDF and don't delete the highlights file!
ultimately actually import the highlights
In the meantime provide guidance as to how to import PDFs with annotations if you used to work on linked files.
Screenshots
No response
Files
No response
Browser, Desktop or Mobile Platform Information
No response
Additional Context
Already tried:
Copying over the old highlights page to the asset folder via the file explorer does not seem to work (db version probably does not use these files anymore).
Copying over the content from Logseq md does not preserve highlight position etc, just the content.
Further ideas:
turn each pdf into an internal one before importing to db. IIRC that works but I don't know of any means to do this automatically for so many files.
Question:
When clicking on annotations page of these PDFs it asks to create "a local one". When I do that a new entity shows up in #Assets and on my journal, but no PDF actually appears in my asset folder. So is this "local asset" merely a reference to the external PDF still?
Are you willing to submit a PR? If you know how to fix the bug.
changed the title [-]PDF import silently drops annotations of linked, non-asset pdfs[/-][+]MD version import silently drops annotations of linked, non-asset pdfs[/+]on Jun 7, 2026
Summary
When importing an existing Markdown graph into the DB version, PDF annotations and asset path resolution fail in two specific external PDF scenarios:
External Local PDFs (file://): Highlights and area crops import, but the generated Asset entity has an unescaped/malformed URI path that prevents the PDF from opening.
External Remote PDFs (https://): Block references pointing to highlights (((UUID))) fail to resolve and render as blank/empty blocks after migration.
Issue 1: External Local PDF generates invalid Asset URI path
Source Markdown format:

*Observed Behavior:
Highlight text and area crops import into the database.
However, clicking to open the PDF fails because the generated Asset entity assigns an invalid path:
Current Imported Path: External URL: file://D:\assets\xxx.pdf (mixed forward/backward slashes and unescaped drive colon).
Manual Workaround: Changing the asset URI schema to the internal format allows it to open correctly:
Working Path: assets:///D/logseq__colon/assets/xxx.pdf
*** Expected Behavior:**
The migration importer should automatically normalize Windows file:/// paths into the valid internal asset URI format (assets:///.../logseq__colon/...).
Notes containing block references to highlights from this remote PDF (e.g., ((6a9157a6-804a-41e4-81e3-87f6d9881127))) fail to import the underlying reference data.
The block reference resolves to nothing/blank in the imported database.
*** Expected Behavior:**
The DB importer should recognize hls__*.md annotation files associated with remote https:// URLs, register the remote PDF as an Asset entity, and preserve all linked block highlight references (((UUID))).
Steps to Reproduce
In Logseq Markdown, create two notes:
Note A: Link a local PDF outside the graph root via  and highlight text/regions.
Note B: Link a remote PDF via  and highlight text.
Reference both highlights in a journal page using ((UUID)).
Import the Markdown graph into Logseq DB (v2.0.1 Beta / Nightly 20260826).
Attempt to open the local PDF from the Asset page \rightarrow path resolution error occurs.
Inspect the journal page \rightarrow the remote PDF block reference ((UUID)) is empty.
Activity
[-]PDF import silently drops annotations of linked, non-asset pdfs[/-][+]MD version import silently drops annotations of linked, non-asset pdfs[/+]juffyyyy commentedon Aug 15, 2026
Hello !
I have a similar issue. Sometimes the highlights are imported, but the annotations (what i write in the same page as the highlights) are deleted.
megayu commentedon Aug 17, 2026
@juffyyyy Which version are you running? It should be fix after logseq/logseq#12815 merged
jaker-dotcom commentedon Aug 20, 2026
Thanks @ everyone involved! I wonder why the issue wasn't closed. Is that up to me? I may need some time for testing the migration again...
ccyang2019 commentedon Aug 29, 2026
I got the similar issue with the latest build. below is the bug report summarized by gemini.
Bug Report: PDF Annotation Import Issues with External Local Paths and Remote URLs
Environment
Summary
When importing an existing Markdown graph into the DB version, PDF annotations and asset path resolution fail in two specific external PDF scenarios:
Issue 1: External Local PDF generates invalid Asset URI path
Source Markdown format:
*Observed Behavior:
*** Expected Behavior:**
Issue 2: External Remote URL PDFs silently drop highlight block references
*** Observed Behavior:**
*** Expected Behavior:**
Steps to Reproduce
and highlight text/regions.and highlight text.tiensonqin commentedon Aug 31, 2026
Closing as fixed by logseq/logseq#12815.