Replies: 5 comments
-
I tried using |
Beta Was this translation helpful? Give feedback.
-
Sorry, but we currently do not officially support using
The code looks like TypeScript, rather than JavaScript, and it also cannot be run directly.
|
Beta Was this translation helpful? Give feedback.
-
Combined everything into a single test module, which can be run as I think everything is the standard usage, except for the OffscreenCanvasFactory.
|
Beta Was this translation helpful? Give feedback.
-
Is OffscreenCanvas support anticipated and/or desirable? It already mostly works and I'm open to contributing bug fixes for whatever remains. Though I don't know a ton about pdf.js internals & structure. |
Beta Was this translation helpful? Give feedback.
-
I'm also curious if the issue also affects the "image conversion/rendering" part below. It may refer to images embedded in the document, not page-rendering. Lines 163 to 165 in 220a289 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Attach (recommended) or Link to PDF file
gradient repo.pdf
Web browser and its version
Chrome 134.0.6998.166
Operating system and its version
Macos 15.3.2
PDF.js version
5.1.91
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
CanvasFactory
option ongetDocument
.PDFViewer
instance that uses this loading task, or usepage.render
api:What is the expected behavior?
Pdf is displayed correctly:
What went wrong?
Gradients seem to either be discarded, or go from 0 to 100 in an instant:
Applies equally to
PDFViewer
andpage.render
output.Link to a viewer
No response
Additional context
Aware that OffscreenCanvas is not the main focus for pdfjs, but there are several tickets that indicate it is supported, including for use entirely in a web worker (e.g. #10319).
Open to contributing a fix, if the issue is fixable, though would appreciate some pointers.
Beta Was this translation helpful? Give feedback.
All reactions