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
Firefox 132.0.1 (64-bit) and Chrome Version 131.0.6778.85 (Official Build) (64-bit)
Operating system and its version
Fedora Workstation 39 x64, Linux kernel 6.11.9-100.fc39.x86_64
PDF.js version
v4.9.155 and git revisions e9c81a6 and 2df5d8f built with npx gulp generic
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
Open the demo document. Insert a stamp annotation onto the first page. Save/download the PDF.
Open the downloaded PDF with the stamp annotation. Scroll down a few pages, e.g. to page 4, so that page 1 is completely off-screen. Click on the stamp tool icon in the toolbar.
Scroll to the top of the document. The stamp annotation will be invisible.
What is the expected behavior?
The stamp annotation should be visible at the top of the document:
What went wrong?
The stamp annotation is not visible at the top of the document. It's vanished.
Somehow, the canvas element that should provide the image data for the editor to use is not present where it's supposed to be in the annotation layer. I believe it is supposed to be created via AnnotationLayer.#setAnnotationCanvasMap.
Another problem occurs after the bug is triggered by following my steps above: If you try to switch tools, the other tools don't work right any more (free text, highlight, etc.). They don't do anything when you click on the document to e.g. start a new free text, add a new highlight, etc.
It appears to me that the lock #updateModeCapability.promise in AnnotationEditorUIManager may be held indefinitely after the error is thrown, as future calls to updateMode seem to hang at tools.js line 1668 (await this.#updateModeCapability.promise;). This seems to make it impossible to change tools after the error occurs.
Link to a viewer
No response
Additional context
This error appears to be present in the original commit where the feature to edit existing stamp annotations was introduced, e9c81a6e, as well as the current HEAD of the development branch, 2df5d8f3.
A side note:
I am accessing my PDF.js over Python's simple HTTP server using the following script: simpleserver.txt
(I have renamed it to txt to bypass github's file type filter.)
I am curious how you all do it on your local machines and would be grateful for any tips on how to set up my local dev environment effectively outside of what's mentioned in the README.
All the best,
Ann
The text was updated successfully, but these errors were encountered:
…visible existing stamp editor
It fixesmozilla#19239.
When the canvas isn't existing the editor has no image: it's fine because the editor is invisible.
Once it's made visible, the canvas is set when the annotation layer has been rendered.
…visible existing stamp editor
It fixesmozilla#19239.
When the canvas isn't existing the editor has no image: it's fine because the editor is invisible.
Once it's made visible, the canvas is set when the annotation layer has been rendered.
…visible existing stamp editor
It fixesmozilla#19239.
When the canvas isn't existing the editor has no image: it's fine because the editor is invisible.
Once it's made visible, the canvas is set when the annotation layer has been rendered.
Attach (recommended) or Link to PDF file
compressed.tracemonkey-pldi-09-23.pdf
Web browser and its version
Firefox 132.0.1 (64-bit) and Chrome Version 131.0.6778.85 (Official Build) (64-bit)
Operating system and its version
Fedora Workstation 39 x64, Linux kernel 6.11.9-100.fc39.x86_64
PDF.js version
v4.9.155 and git revisions e9c81a6 and 2df5d8f built with
npx gulp generic
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
Open the demo document. Insert a stamp annotation onto the first page. Save/download the PDF.
Open the downloaded PDF with the stamp annotation. Scroll down a few pages, e.g. to page 4, so that page 1 is completely off-screen. Click on the stamp tool icon in the toolbar.
An error will be thrown in the console:
What is the expected behavior?
The stamp annotation should be visible at the top of the document:
What went wrong?
The stamp annotation is not visible at the top of the document. It's vanished.
Somehow, the canvas element that should provide the image data for the editor to use is not present where it's supposed to be in the annotation layer. I believe it is supposed to be created via
AnnotationLayer.#setAnnotationCanvasMap
.Another problem occurs after the bug is triggered by following my steps above: If you try to switch tools, the other tools don't work right any more (free text, highlight, etc.). They don't do anything when you click on the document to e.g. start a new free text, add a new highlight, etc.
It appears to me that the lock
#updateModeCapability.promise
inAnnotationEditorUIManager
may be held indefinitely after the error is thrown, as future calls toupdateMode
seem to hang attools.js
line 1668 (await this.#updateModeCapability.promise;
). This seems to make it impossible to change tools after the error occurs.Link to a viewer
No response
Additional context
This error appears to be present in the original commit where the feature to edit existing stamp annotations was introduced,
e9c81a6e
, as well as the current HEAD of the development branch,2df5d8f3
.A side note:
I am accessing my PDF.js over Python's simple HTTP server using the following script:
simpleserver.txt
(I have renamed it to txt to bypass github's file type filter.)
I am curious how you all do it on your local machines and would be grateful for any tips on how to set up my local dev environment effectively outside of what's mentioned in the README.
All the best,
Ann
The text was updated successfully, but these errors were encountered: