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?
  • Can you provide a Debug ID for it happening?
  • D1630363268
  • Is this functionality provided by a plugin? If so, you'll need to contact the plugin's developer.
  • (Just to confirm, Zotero's own "Go to Page" functionality for annotations added to notes does work for Roman page numbers)
  • The following are two examples. I assume these links are what your referring to as the "Go to Page" functionality.

    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
  • but where is that link coming from?

    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.
  • If I am answering your question correctly, my links are coming from my template:

    [(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
  • what happens when you change the first one to say page=4?
  • To do this, I changed the template to use page={{annotation.page}} in place of page={{annotation.pageLabel}}. The link, then, opens the pdf to page 4 of the pdf, but not the target annotation which is on the earlier page iv.

    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.
  • to add to the above, using {{annotation.page}} opens the pdf to pageLabel 4, which is physical page 14; pageLabel iv is physical page 4.
  • In trying to find some clarity in this discussion, I removed all the roman numeral page numbers from the subject pdf, and reset the pageLabels using only arabic numbers. Links to annotations opened the pdf to the correct pages, whether the physical page itself had a roman numeral or arabic page number.

    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.
  • As I said, this is working for me, so it's not the case that it does not work. It does sound like the Obsidian plugin generates theses incorrectly.
    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.
  • @adamsmith I didn't understand your first question, but, after your last, I think I do. The links to annotations created in "the Obsidian plugin" (Zotero Integration) or a Zotero note both work, provided I use Zotero Reader. The links do not work if I use Acrobat as the reader. I wish I knew why. The good news is that using Zotero Reader is a solution to this issue. So, thanks for your guidance and patience.

    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?
Sign In or Register to comment.