-
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
DPUScan pdf shows black screen #10026
Comments
From https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md:
Closing since there is nothing we can do without an example PDF file. Perhaps you can make a non-classified PDF file with the same tool to share here, after which we can reopen this. |
This comment was marked as outdated.
This comment was marked as outdated.
Finally managed to get a non-classified pdf file. I have attached the same here. Can someone have a look? |
The file also fails in PDFBox… in java the image has an RGB icc colorspace but in the raster it has only 1 band with 1 bit pixels. One would have to analyze the JPEG2000 image with a good tool that tells what meta data is really there.. |
This comment was marked as outdated.
This comment was marked as outdated.
issue for PDFBox: |
Here's another exotic PDF file with a JPEG2000 image that can't be rendered with PDF.js (page 11, bottom right); the JPEG2000 image has 4 bits per pixel. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
I did some debugging and looked at jpx_stream.js. After jpxImage.parse() the object has 1 tile which is only zeroes. The size is correct, i.e. 2496 x 3512 = 8765952. (With the other file I attached, the decoded bytes were all 255) So this suggests that the problem is in the JPEG2000 decoder and not with the colorspace as in PDFBox. @rafaelcaviquioli this is an open source project and powered by volunteers who may or may not have time. Re "my head depending on this solution": if it is so, then free somebody or several people of your team for a few days and have them debug the JPEG2000 decoder. The show happens in |
This seems to have been fixed in PDFBox (https://issues.apache.org/jira/browse/PDFBOX-4326). |
Closing since both the test file and the PDFBox file now render correctly in the most recent version of PDF.js, most likely thanks to #17946. |
Attach (recommended) or Link to PDF file here:
I am unable to get the official document due to restriction. But I have attached the screenshot. The issue seems to happen for all DPUScan documents of pdf 1.5
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
PDF should be rendered correctly
What went wrong? (add screenshot)
Black screen is shown
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
The text was updated successfully, but these errors were encountered: