Attach (recommended) or Link to PDF file
Annotation editor preview renders Ink annotations below Stamp/Image annotations, but saved PDF renders correctly
Web browser and its version
Chrome, Firefox, Edge
Operating system and its version
Windows 11 Pro 25H2
PDF.js version
PDF.js version: 6.0.122 (also reproducible in 5.4.394)
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
Steps:
- Open web/viewer.html.
- Insert an image using the Image tool.
- Draw an ink annotation that overlaps the image.
- Observe that the image is rendered above the ink annotation in the editor.
- Save/download the PDF.
- Reopen the saved PDF.
- Observe that the ink annotation is rendered above the image, which matches the expected annotation order.
What is the expected behavior?
The editor preview should match the final PDF rendering. Since the ink annotation was created after the image annotation, the ink stroke should appear above the image both in the editor and in the saved PDF.
What went wrong?
While editing, the image is rendered above the ink annotation, making the stroke appear underneath the image. After saving and reopening the PDF, the rendering is correct and the ink annotation appears above the image.
Therefore, the annotation editor preview does not match the final PDF output.
Link to a viewer
https://mozilla.github.io/pdf.js/web/viewer.html
Additional context
No response
Attach (recommended) or Link to PDF file
Annotation editor preview renders Ink annotations below Stamp/Image annotations, but saved PDF renders correctly
Web browser and its version
Chrome, Firefox, Edge
Operating system and its version
Windows 11 Pro 25H2
PDF.js version
PDF.js version: 6.0.122 (also reproducible in 5.4.394)
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
Steps:
What is the expected behavior?
The editor preview should match the final PDF rendering. Since the ink annotation was created after the image annotation, the ink stroke should appear above the image both in the editor and in the saved PDF.
What went wrong?
While editing, the image is rendered above the ink annotation, making the stroke appear underneath the image. After saving and reopening the PDF, the rendering is correct and the ink annotation appears above the image.
Therefore, the annotation editor preview does not match the final PDF output.
Link to a viewer
https://mozilla.github.io/pdf.js/web/viewer.html
Additional context
No response