-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Unhandled rejections #3417
Comments
Yury probably knows more about this. I find it really strange that only the last page is not rendered and the rest is rendered perfectly... /cc @yurydelendik |
This is because only the last page contains embedded JPG image (or something) which has unknown compression. |
It seems like the last page is either corrupted, or a really unknown compression is used, since Adobe Acrobat also complains when I open it and go to the last page: "Insufficient data for an image" (translated from Dutch) is the error I'm getting. Edit: http://blogs.adobe.com/dmcmahon/2012/08/21/acrobat-insufficient-data-for-an-image-error-after-updating-to-10-1-4-or-9-5-2 states a possible reason for this, which might help the developers: "This error occurs due to a problem in the Adobe Acrobat/Reader functionality used to display scanned documents and/or documents containing JP2K images." |
Yes. But the issue is that promise is not rejected! This is the problem. I know that there are definitely bad PDFs in the world which are impossible to parse correctly. But we should get an error. |
@mitar Indeed. I was just trying to find out what caused the error :) I don't know why the promise is not rejected. |
Web console: [07:22:40.742] "PDF e13db2ba590fba92626889ee71ad58 [1.4 pdfTeX-1.40.4 / Em 08/04/2013 07:06 PM, Yury Delendik escreveu:
|
This is even written in the comment here. |
It seems
|
|
@mitar still interested in this issue? @Snuffleupagus made a PR #4945 you might want to check out. |
I am using pdf.js in node.js. It works pretty well, but the issue is that pdf.js does not seem to pass errors from the worker to the main promises (getDocument, getPage, getTextContent, render) in the case of error. For example, the last page of this PDF cannot be rendered with pdf.js currently and I get this error printed:
And then after this:
This is all very nice debugging output, but the issue is that all promises I am waiting on (getDocument, getPage, getTextContent, render) are left unresolved. Is there a way that this errors could be passed back to those promises so that at least one would be rejected?
The text was updated successfully, but these errors were encountered: