extract pdf page numbers from annotation

edited June 5, 2022
In "note templates" there are only a few variables, including highlight, citation, and comment. Would it be possible to include the page number as a separate variable? It is included in citation, and in the link to the item, so it definitely can be made available to the note template. It would be great if it was possible to use the page number variable separately from the citation.
  • I would appreciate having a positive or negative answer to this question. Page number variable is available to Obsidian plugins when annotations are done in regular PDF readers and are embedded in PDFs. Please let me know if this is likely to be added to Zotero annotations. Thank you.
  • Page number variable is available to Obsidian plugins when annotations are done in regular PDF readers and are embedded in PDFs.
    I'm not sure what you mean by this. Zotero can add both its own annotations and embedded annotations to notes, and the result is exactly the same. As you say, the page number is included in the citation and included in the links Zotero creates, so they're certainly available to plugins as well.

    Can you say why you want page number as a separate variable?
  • edited June 5, 2022
    I need page number separately so I can put it in a separate field and sort notes from the source by page number (in Obsidian). Sure, I can write a script for an Obsidian plugin (Templater) that extracts the page number from the URL for the highlight. But if you make this variable available it can be imported more easily via the Zotero Integration plugin and I will not have to create a script.

    So I just need a yes or no on this--if it's a no I'll just make my own script to extract.
  • We don't have any immediate plans to add new variables to note templates, no.

    To be clear, though, a plugin has access to the same metadata as Zotero's own export mechanism and could make it possible to include the page number in various ways. If we implemented a way to do this, there's a good chance it would be via export templates, not note templates — i.e., a way to customize the citation → Markdown conversion that already exists.
  • @dstillman thanks! The export route makes sense, I'm sure that's what Zotero Integration plugin will use down the road. In the meantime, my own workaround is working just fine.
Sign In or Register to comment.