Zotero Integration is changing page numbers of annotations

What I’m trying to do

I have used Danny Hatcher’s templates to import annotations from Zotero. However, I just noticed that the annotations restart the numbering fro 1, and do not use the page numbers from the Zotero Annotations.

I am using the inbuilt PDF editor in Zotero to make annotations.

Things I have tried

  • Tried importing without an annotation file extracted from the PDF.
  • Tried importing with an annotation file extracted from the PDF.

Does anyone know what is happening here?

Can you share some screenshots? And question: If you use the “Add note from annotations” option in Zotero, do the page numbers there also start from 1?

Thanks for taking the time to look at this. Here is the requested information:


This is the PDF pane from Zotero, with the annotations visible to the left.


This is the item with the extracted annotation note file displaying in the viewing pane. You can see that the page numbers have been extracted correctly. I can also confirm that the ‘Pages’ field is populated.


This is how it renders in Obsidian. Page 401 has now become page 1.

1 Like

Thanks for the screenshots!

Can you do this test:

  1. Open the command palette in Obsidian: (cmd / ctrl + P)
  2. Search “Data explorer” and use the command
  3. In the data explorer, press “Prompt for selection” and find the same item as in the screenshots
  4. Among all the data for this item, find “annotations”
  5. Click to expand the annotations array, where each annotation is listed as a number.
  6. Click the first number to expand it and see the data associated with the annotation
  7. Find page and pageLabel
    • page is an index starting from the first page in the PDF, e.g. 1
    • pageLabel ought to be the is correct page number in the volume, e.g. 401
  8. Are page and pageLabel the same, or does pageLabel correctly show 401, for example?

They are different, one also appears to be a number and the other text (if I am interpreting the colours and use of quotes correctly).

Page: 1
pageLabel “401”

Screenshot 2024-03-11 at 20.58.06

This is the code that points to the annotation meta data for the callouts. Do you think I need to adjust it?

> [!quote]+ {{calloutHeader(annot.type)}} ([Page {{annot.page}}]({{annot.desktopURI}}))

Oh yeah, just replace page with pageLabel in {{annot.page}} and you should be good to go :wink:

I checked the link for Danny’s template, and just reviewed Luke’s template that he adapted. In the original, it uses pageLabel, so I’m not sure why Danny went with page.

Thank you so much for taking the time to help me, that worked :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.