Creating new protocol handler

63 views
Skip to first unread message

Kim Vallée

unread,
May 30, 2025, 8:38:54 AMMay 30
to zotero-dev
Hi all,

I am trying to create link on pdfs which would fire zotero pdf reader on the right page. These links would be created from latex, meaning that the data to which I have access is the citation key from my bib(la)tex entities. I use the plugin betterbibtex for generating such citation keys, and thus I know they are unique.

After looking a bit around, I came to understand that protocol handlers are probably my best bet, like "open zotero://open-pdf/library/items/Y5NPNXU4?page=5", to achieve what I want. But there is one step which I cannot figure out, i.e., how to convert my citation key to a unique key.

I have made up the following code in the javascript console of zotero which achieves it:
https://pastebin.com/sc1NrN3b

It is not perfect but it is functional...

I am now wondering if there is a simple way to combine these two methods (protocol handler + script) so that I can automate the process. I was thinking of creating a new protocol handler for zotero (maybe through a plugin ? But that seems overkill) that would look like:
zotero://open-cite/citationkey?page=5

All inputs are appreciated !

XY Wong

unread,
Jun 3, 2025, 7:33:34 AMJun 3
to zotero-dev
If you want to create a new protocol handler, it is usually recommended to make a plugin.
Reply all
Reply to author
Forward
0 new messages