Skip to content
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

The bottom part of some images are rendered incorrectly: "Warning: JPX error: Out of packets. Trying to recover" #4358

Closed
yaro-m opened this issue Feb 28, 2014 · 9 comments

Comments

@yaro-m
Copy link

yaro-m commented Feb 28, 2014

PDFJS preview renders PDF with diffrent color rather than any other desktop application.
Reproduces on any browser.
Use this PDF file https://www.dropbox.com/s/q6b57x1vs72q7lx/748958.pdf with demo viewer to check http://mozilla.github.io/pdf.js/web/viewer.html

@Snuffleupagus
Copy link
Collaborator

From the console:

"PDF a07ee83d39533aeab28ee0985c18c2a2 [1.6 Mac OS X 10.8.4 Quartz PDFContext / PowerPoint] (PDF.js: 0.8.1067)" viewer.js:3178
"Warning: JPX error: Out of packets. Trying to recover" pdf.worker.js:190

@fkaelberer
Copy link
Contributor

Duplicate of #3561, I guess.

@Snuffleupagus
Copy link
Collaborator

An update: the colours are now fixed, courtesy of PR #4397, but there are still slight issues with some of the images. As can be seen in the highlighted area in this screenshot, they are not rendered completely correct:

missing

@yaro-m
Copy link
Author

yaro-m commented Mar 6, 2014

Thank you guys for update!

@Snuffleupagus Snuffleupagus changed the title PDF colors are different in pdfjs preview and desktop applications The bottom part of some images are rendered incorrectly: "Warning: JPX error: Out of packets. Trying to recover" Apr 21, 2014
@Snuffleupagus
Copy link
Collaborator

[Updated the title to better reflect the remaining issue.]

@Snuffleupagus
Copy link
Collaborator

Since the file referenced above no longer appears to be available, the following is another file that has the same error: http://www.yotsuyaotsuka.com/kyozai/image/4th_grade/01_04.pdf.

@fkaelberer
Copy link
Contributor

fkaelberer commented Apr 21, 2014

Here's a copy of the original document:
https://www.dropbox.com/s/vs20rvi44usarv2/748958.pdf
748958.pdf

@CodingFabian
Copy link
Contributor

i dug into this a bit. what i figured out is that this is caused by the size of that last tile. getBlocksDimensions does use "15" Changing this value affects of course other stuff as well, but makes the colorful pixels go away. The correct solution seems to find the right place where the coordinates need to be limited for decoding.

@Snuffleupagus
Copy link
Collaborator

Fixed by PR #5426.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants