mgmeyers / obsidian-zotero-integration

Insert and import citations, bibliographies, notes, and PDF annotations from Zotero into Obsidian.
GNU General Public License v3.0
913 stars 50 forks source link

Opening PDF using the Deafault PDF Viewer from the Markdown file #357

Open karimmd opened 3 months ago

karimmd commented 3 months ago

Hi, I am using the following template to bring all the annotations from the PDF. Also the PDF can be opened and can be viewed the annotated text while I click on the Shortcut link. I was wondering whether there are any way to just view the PDF file with no annotation which I want to include here:

>[!Info]
>Title:: {{title}}
>Authors: {{authors}}{{directors}}
>citekey: {{citekey}}
>[PDF Source](zotero://open-pdf/library/items/{{a.attachment.itemKey}})

While I am using the Zotero Integration from Obsidian, PDF Source is not working as I intend to open the desired PDF from that link which will be opened in the Adobe or Sumatra based on which default viewer I choose in my Zotero. I am sure I am missing something here. I am not understanding the reason why it works if I am taking all the annotation from the PDF but does not work if I only want to use the open-pdf/library/items function

{% for a in newAnnotations %}
{{a.annotatedText}}”{% if a.color %} {{a.colorCategory}} {{a.type | capitalize}} {% else %} {{a.type | capitalize}} {% endif %}[Page {{a.page}}](zotero://open-pdf/library/items/{{a.attachment.itemKey}}?page={{a.page}}&annotation={{a.id}})
{% endfor %}
{% endif %}