I'm working on adding bookmarks to the PDF reader

200 views
Skip to first unread message

Chen Chuyang

unread,
May 31, 2022, 8:12:09 AM5/31/22
to zoter...@googlegroups.com
Hi, developers! I'm working on adding bookmarks, a key feature for reading long papers, to the PDF reader. My plan is to add a bookmark panel in the sidebar. However, in pdf.js I found that there is already a bookmark button in the secondary toolbar (and a corresponding bookmark view element in viewer.html). Nothing happens when clicking the button, and I've tried deleting it but the PDF file cannot load after. I'm confused... I'm not sure whether I should
  1. add a new bookmark panel directly to the sidebar, leaving the already-existing bookmark button unchanged, or 
  2. add the panel and delete the useless toolbar button, or 
  3. move the toolbar button to the sidebar and try to make it function, or
  4. directly work on the toolbar button to make it function and leverage it in the pdf-reader wrapper layer.
Can you give me some advice? Any other suggestions will also be helpful.

--
Chuyang Chen
MSc Student
at CS Department, Nanjing University

Martynas Bagdonas

unread,
Jun 1, 2022, 10:02:04 AM6/1/22
to zotero-dev
This is going to be more complicated than you think. PDF.js viewer is just a viewer, and not an editor. It can't edit PDFs except to fill forms, but this is a different story. The bookmark button just appends page number, zoom and page position to the current link, and doesn't do anything else. We edit PDFs over pdf-worker.
Reply all
Reply to author
Forward
0 new messages