Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bookmark and Note functionalities to PDF.js viewer #18869

Closed
wants to merge 1 commit into from

Conversation

execis
Copy link

@execis execis commented Oct 8, 2024

Implementation Details

Bookmarks:

  • Added a Bookmark button to the toolbar (viewer.html).
  • Created a Bookmarks view in the sidebar to list all bookmarks (viewer.html, viewer.js).
  • Implemented addBookmark and displayBookmarks methods in PDFViewerApplication (viewer.js).
  • Updated PDFSidebar to handle the Bookmarks view (pdf_sidebar.js).

Notes:

  • Added a Note button to the toolbar (viewer.html).
  • Implemented addNote and displayNotesForPage methods in PDFViewerApplication (viewer.js).
  • Notes are displayed on the pages where they were added and persist across sessions.

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Oct 8, 2024

Was this perhaps intended for a custom viewer implementation, since it's unfortunately not entirely clear here that this is functionality that belongs in the PDF.js repository itself?
(Also, based on a very brief look at the code this would likely require a fair bit of work before it could be considered.)

@execis
Copy link
Author

execis commented Oct 8, 2024

Hey Jonas! Yes, I wanted to get started on it and hopefully get some feedback. The two buttons are now added to the top toolbar with some basic functionality but the details were not mentioned in the opened issue, so I'll see how functional I can make the two buttons.

@Snuffleupagus
Copy link
Collaborator

Before putting a bunch of work into this, please see #18865 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants