Programatic Highlighting/Annotation Feature

I have an automated pipeline which is outfitted to extract specific information about a PDF that I would like embedded back into the Zotero pdf viewer, but I am unable to properly attach that info to the pdf directly (highlights, not notes).

Unfortunately, I can only attach the information to the pdf parent if there is no 'annotationSortIndex' even if I provide the rectangles for the highlight in the provided dictionary. The format of the sortIndex is not something I can guess at, but seems required for the uploaded information to be visible in the viewer (the viewer shows errors without the proper sortIndex). If there were a way to programmatically add highlights and annotations via API, this would greatly enhance my experience (I'm using pyzotero for this). Anyone have ideas on how to do this?
Sign In or Register to comment.