You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Activate the annotation editor by clicking highlight on the toolbar.
Scroll down to the following pages to load the annotations.
Press Ctrl+A to select all annotations in the PDF.
Press delete to remove all annotations at once.
What is the expected behavior?
All annotations should be removed from the PDF.
What went wrong?
Although the annotations are no longer selectable, some of them still appear visible in the viewer. They only disappear once the annotation editor is closed.
Link to a viewer
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
This is a tricky bug...
When the pdf is rendered we only render the 2 (it depends of the zoom level) first pages, so we're only aware of the annotations we have on those pages. That means we don't have the ids, the properties, ... of the other annotations in the pdf.
For example, we can ctrl+a and then change the color of one highlight, it should impact all the highlights of the document.
So I think the only right way to fix this would be to get all the editable annotations when the user is selecting all, put them in the storage, and then apply the changes to the data we've in the storage.
The problem is most likely OS related. I played around with it on macOS Firefox latest version (132.0.2 aarch64) and Chrome (131.0.6778.70). PDF.js correctly identified and rendered all highlighted text, regardless of the zoom level (even on "Page Fit", all highlights were selected and removed after backspacing or clicking on the delete button).
Attach (recommended) or Link to PDF file
test.pdf
Web browser and its version
Mozilla Firefox
Operating system and its version
Windows 10
PDF.js version
4.7.76
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
What is the expected behavior?
All annotations should be removed from the PDF.
What went wrong?
Although the annotations are no longer selectable, some of them still appear visible in the viewer. They only disappear once the annotation editor is closed.
Link to a viewer
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: