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
Thanks for fixing this @Snuffleupagus! It'll be nice to not have to wrestle with canvas going forward.
Any idea when the next release will be cut? I'm still encountering this bug on v4.8.69, and I haven't found a workaround.
EDIT: I found a workaround - downgrading canvas to 2.x fixes the issue. IDK if there are any incompatibility issues with pdf.js v4.8.69 though. Canvas 2.x does not work in workers either. I'm still looking forward to #19015 shipping!
Attach (recommended) or Link to PDF file
N/A
Web browser and its version
JSDom 25.0.1, Chrome 131.0.6778.70
Operating system and its version
Ubuntu 22
PDF.js version
v4.8.69
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
canvas.getContext
(as described in Mozilla MDN docs):Cannot assign to read only property
error such asCannot assign to read only property 'createPattern' of object '#<CanvasRenderingContext2D'
What is the expected behavior?
Its expected that using the canvas API continues to work as as described in Mozilla MDN docs as it did in v4.7.76
What went wrong?
v4.8.69 of pdfjs-dist updates to canvas v3.0.0 RC which has a known issue in canvas with read only properties (a PR has been merged to fix this but has not been released yet)
Link to a viewer
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: