logseq-logtero-plugin icon indicating copy to clipboard operation
logseq-logtero-plugin copied to clipboard

I could not open pdf file directly in logseq

Open JWangL5 opened this issue 3 years ago • 3 comments

I have already install and configure properly, and it works well. But I can't open pdf file directly in logseq using {{pdf}} placeholder but open in my default pdf viewer. There's no auto pdf logo showed in block. Here is my page generated by logtero:

authors:: "Schnitzbauer, J., Strauss, M., Schlichthaerle, T., Schueder, F., Jungmann, R."
file-path:: D:\ZoteroData\storage\YE63XLY2\2017(Nat Protoc)Super-resolution microscopy with DNA-PAINT.pdf{{}}
url:: https://www.nature.com/articles/nprot.2017.024
year:: 2017
title:: @Schnitzbauer et al. (2017) Super-resolution microscopy with DNA-PAINT
local-library:: [Local library](zotero://select/library/items/Y46V595G)
doi:: 10.1038/nprot.2017.024
journal:: Nature Protocols
pdf:: ![2017(Nat Protoc)Super-resolution microscopy with DNA-PAINT.pdf](D:\ZoteroData\storage\YE63XLY2\2017(Nat Protoc)Super-resolution microscopy with DNA-PAINT.pdf)

I noticed the proper pdf was show if the pdf path is defaut assert path, or a {{zotero-import-file xxx}} followed by [name](path).

How could I solve this problem? Is there anything wrong in my configuration? My logseq is the latest (0.8.7).

JWangL5 avatar Sep 15 '22 17:09 JWangL5

can you add file:\\\ in front of the file path to see if it works?

it'd look like this: pdf:: ![2017(Nat Protoc)Super-resolution microscopy with DNA-PAINT.pdf](file:\\\D:\ZoteroData\storage\YE63XLY2\2017(Nat Protoc)Super-resolution microscopy with DNA-PAINT.pdf)

vyleung avatar Sep 15 '22 23:09 vyleung

@vyleung Thanks for your reply. I have already tried the file:\\\, but it still opened in default pdf viewer. 😅

JWangL5 avatar Sep 16 '22 09:09 JWangL5

@vyleung Could you modify the code to copy the pdf into a subfolder in assets folder, and insert the new path to logseq note? I have tried it could open in logseq if using the logseqfolder/assets folder witn the same syntax, like ![paperName](../assets/subfolder/paper.pdf), I think this maybe the easiest way to solve this problem and could meet my needs prefectly! Thanks a lot!

JWangL5 avatar Sep 17 '22 23:09 JWangL5