-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to decode image: InvalidStateError #17190
Comments
Most likely the huge image dimensions are the problem, given the following excerpt (taken from http://brendandahl.github.io/pdf.js.utils/browser/):
|
So what (roughly) is the limiting factor that keeps the large image from being downloaded and processed? It looks like the promise tasked with fetching the image just quits at some point. |
This comment was marked as duplicate.
This comment was marked as duplicate.
I also get the same error but only for PDFs that are very large (130+ x 50+ in) and may or may not contain multiple page sizes (each page has different dimensions). My PDFs are the default outputs of using the utility TIFF2PDF. What should we do with files that are too large? Is there a setting we can configure in PDF.js? Thanks! Specifically, I'm using PDF.js in https://github.com/wojtekmaj/react-pdf v7.7.0. |
Yes, this is our issue as well. Some further investigation has shown that both the image and the PDF are not very large in terms of memory, only in physical dimensions. Is it a matter of allocating memory for the bitmap within PDF.js? |
As mentioned in #17190 (comment) the image size is the issue. |
Has there been any progress on this issue?
Chrome's built-in PDF viewer is able to handle the sample document. Do you suppose they are doing something like the above? |
Attach (recommended) or Link to PDF file here:
org_AVA89V01U0$ (Black).pdf
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
This is the upper left corner at 200% zoom in Acrobat:
What went wrong? (add screenshot)
The console on Chrome:
PDF a8c52134c310cca513061a5a2ce6ca91 [1.3 - / -] (PDF.js: 4.0.132 [3478112])
util.js:367 Warning: Unable to decode image "img_p0_1": "InvalidStateError: The source image could not be decoded.".
util.js:367 Warning: Dependent image isn't ready yet
The console on Firefox:
PDF a8c52134c310cca513061a5a2ce6ca91 [1.3 - / -] (PDF.js: 4.0.132 [3478112]) app.js:1561:12
Warning: Unable to decode image "img_p0_1": "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable". pdf.worker.mjs:339:13
Warning: Dependent image isn't ready yet 3 util.js:367:12
The console on Edge:
PDF a8c52134c310cca513061a5a2ce6ca91 [1.3 - / -] (PDF.js: 4.0.132 [3478112])
util.js:367 Warning: Unable to decode image "img_p0_1": "InvalidStateError: The source image could not be decoded.".
2util.js:367 Warning: Dependent image isn't ready yet
util.js:367 Warning: Dependent image isn't ready yet
This is the upper left corner at 200% zoom in Chrome:
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
https://mozilla.github.io/pdf.js/web/viewer.html
The text was updated successfully, but these errors were encountered: