links to annotations on pages with roman numeral pageLabels do not work
Zotero 7.0.30
Obsidian 1.10.6
Adobe Acrobat
Zotero Integration
I annotate PDFs using Acrobat. I use Zotero Integration to import those annotations from Zotero into Obsidian. This all works flawlessly, except when annotations are on pages with roman numeral pageLabels, typically frontmatter.
This is a snippet from my latest attempt: {%- elif annotation.annotatedText %}
{{annotation.annotatedText}}[(p. {{annotation.pageLabel}})]({{annotation.desktopURI}})
The link, and other variations I have tried, opens up the PDF to the correct page when the pageLabel is an arabic number. However, in all cases where the pageLabel is a roman numeral, it merely opens up the PDF, usually to its first physical page, with a dialog box stating "There is no page numbered 'NaN' (Not a Number) in this document."
Is there a solution for this issue?
Obsidian 1.10.6
Adobe Acrobat
Zotero Integration
I annotate PDFs using Acrobat. I use Zotero Integration to import those annotations from Zotero into Obsidian. This all works flawlessly, except when annotations are on pages with roman numeral pageLabels, typically frontmatter.
This is a snippet from my latest attempt: {%- elif annotation.annotatedText %}
{{annotation.annotatedText}}[(p. {{annotation.pageLabel}})]({{annotation.desktopURI}})
The link, and other variations I have tried, opens up the PDF to the correct page when the pageLabel is an arabic number. However, in all cases where the pageLabel is a roman numeral, it merely opens up the PDF, usually to its first physical page, with a dialog box stating "There is no page numbered 'NaN' (Not a Number) in this document."
Is there a solution for this issue?
Upgrade Storage
This does not work for me, to open the pdf to a page with a roman numeral pageLabel: zotero://open-pdf/library/items/G337A94X?page=vi
This does work for pageLabels with arabic numbers: zotero://open-pdf/library/items/G337A94X?page=3
When I create an annotation on page iii in a Zotero note and then copy that annotation to a Zotero note and then copy from there into a text editor, it's
zotero://open-pdf/library/items/BEPMNZ42?page=3&annotation=AKAGJ6KP
i.e. even though iii is recognized for citation purposes, it uses the absolute page number for the annotation. Opening an annotation on the actual p. 3 of the PDF is
zotero://open-pdf/library/items/BEPMNZ42?page=7&annotation=P269TU6D
the links also include the annotation IDs, presumably for more reliable linking.
[(p. {{annotation.pageLabel}})](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.pageLabel}}&annotation={{annotation.id}})
which renders, for example, these links to different annotations in the same pdf file:
zotero://open-pdf/library/items/G337A94X?page=iv&annotation=highlight-p4x251y830
- this does NOT open the pdf to pageLabel iv, which is physical page 4
zotero://open-pdf/library/items/G337A94X?page=3&annotation=highlight-p13x290y541)
- this DOES work to open the pdf to pageLabel 3, which is on physical page 13
I'm trying different combinations of the variables, and so far note a couple of observations:
- the use of {{annotation.pageLabel}} in the [link text] recognizes the correct page, whether roman numerals or arabic;
- the use of {{annotation.pageLabel}} in the URL recognizes the correct page whether it has roman numeral or arabic pageLabels, but does not cause the link to open to that page if the pageLabel is a roman numeral; and
- all works as expected if there are no pages in the pdf with roman numeral pageLabels.
The conclusion I've reached is that links to annotations in pdfs containing roman numeral page numbers do not work to open the pdf to the correct pages.
If you go back to my first question, I didn't ask you about the output of your template, but about copying the Zotero annotation added to a Zotero note -- I don't think you ever did that, that'd be the first thing to check. Once you've gotten this to work with purely Zotero features, you'll be able to properly report the issue to the Obsidian plugin developer.
One related issue: in Zotero Reader, the page box it the toolbar shows a minus sign (-) for those pages in the pdf that have roman numeral page labels. This only creates an issue if Zotero Integration is used to import annotations into an Obsidian note. The roman numeral page numbers are not shown, instead the minus sign is substituted for each roman numeral, like this: (p. -). Would it be possible to fix this in Zotero Reader?