Exported Annotations have PDF page number instead of actual page number
EDIT: I solved this by using {{annotation.pageLabel}} instead of just {{annotation.page}}!
Hello,
I'm exporting annotations made in the Zotero PDF viewer to Obsidian using Zotero Integration's "Import" option. I have a template made to extract the annotations:
{% for annotation in annotations -%}{%- if annotation.annotatedText -%}{% if 'Red' in annotation.colorCategory %}
##### {{annotation.annotatedText | escape }}{% else %}
{{annotation.annotatedText | escape }} ([{{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}&annotation={{annotation.id}}))
{% endif %}{%- endif %} {% if annotation.imageRelativePath %} ![[{{annotation.imageRelativePath}}]]{% endif %}{% if annotation.comment %}
{{annotation.comment}}
{% endif %}{% endfor -%}
When I make annotations in Zotero PDF viewer, I am able to change the page number from the PDF page number to the "actual" page number (of the book the PDF is a section of), and then it even remembers and populates new annotations' page numbers as the "actual" page numbers in relation. This is awesome!
My problem is that when I import those annotations into Obsidian, the PDF page number populates in the {{annotation.page}} hyperlink section instead of the actual page number. Here's how it looks in Obsidian (in markdown format):
Where fear and weapons meet — and they often do in urban America — there is always the possibility of death ([3](zotero://open-pdf/library/items/6XPPZCVN?page=3&annotation=6FGZMHNN))
Instead of [3], it should be [519]. This is how it shows up in Zotero's notes after I select "Add Note from Annotations":
"Where fear and weapons meet — and they often do in urban America — there is always the possibility of death” (Staples, 2018, p. 519)
Any idea how I can modify the template to do this, or will I just have to go in and change all of the hyperlinks manually?
Hello,
I'm exporting annotations made in the Zotero PDF viewer to Obsidian using Zotero Integration's "Import" option. I have a template made to extract the annotations:
{% for annotation in annotations -%}{%- if annotation.annotatedText -%}{% if 'Red' in annotation.colorCategory %}
##### {{annotation.annotatedText | escape }}{% else %}
{{annotation.annotatedText | escape }} ([{{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}&annotation={{annotation.id}}))
{% endif %}{%- endif %} {% if annotation.imageRelativePath %} ![[{{annotation.imageRelativePath}}]]{% endif %}{% if annotation.comment %}
{{annotation.comment}}
{% endif %}{% endfor -%}
When I make annotations in Zotero PDF viewer, I am able to change the page number from the PDF page number to the "actual" page number (of the book the PDF is a section of), and then it even remembers and populates new annotations' page numbers as the "actual" page numbers in relation. This is awesome!
My problem is that when I import those annotations into Obsidian, the PDF page number populates in the {{annotation.page}} hyperlink section instead of the actual page number. Here's how it looks in Obsidian (in markdown format):
Where fear and weapons meet — and they often do in urban America — there is always the possibility of death ([3](zotero://open-pdf/library/items/6XPPZCVN?page=3&annotation=6FGZMHNN))
Instead of [3], it should be [519]. This is how it shows up in Zotero's notes after I select "Add Note from Annotations":
"Where fear and weapons meet — and they often do in urban America — there is always the possibility of death” (Staples, 2018, p. 519)
Any idea how I can modify the template to do this, or will I just have to go in and change all of the hyperlinks manually?
You're talking about this? We don't have anything to do with that. I'd be curious to know if you thought we did, because it's very important to us that people have a clear understanding of when something is our software vs. a third-party tool.
Obsidian is just a markdown editor. Zotero Integration is a very popular community-made Obsidian plugin that allows one to import citations and annotations from their Zotero library into obsidian! :)
Don’t worry about it, I was able to figure out the issue by looking at some other users’ templates. Thanks for responding, though!