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

Blocky/blurry image in first two pages of a PDF #5349

Closed
michaelrlevy opened this issue Sep 26, 2014 · 5 comments · Fixed by #5426
Closed

Blocky/blurry image in first two pages of a PDF #5349

michaelrlevy opened this issue Sep 26, 2014 · 5 comments · Fixed by #5426

Comments

@michaelrlevy
Copy link

A certain PDF file created with Adobe Acrobat 10.1.10 and Adobe Acrobat 10.0 Paper Capture Plug-in displays blurry/blocky images on the first two pages; after the first two pages it's very sharp.
Please refer to this PDF file:
http://digitalarchives.assets.ushmm.org.s3.amazonaws.com/pdfjstest/blocky-in-pdfjs.pdf

Images below are as viewed in Chrome and as viewed in Firefox 30.0
Chrome:
image

Firefox 30.0:
image

@Snuffleupagus
Copy link
Collaborator

From the console:

"PDF ce71a331c416a049b9988b928137ab79 [1.6 Adobe Acrobat 10.0 Paper Capture Plug-in / Adobe Acrobat 10.1.10] (PDF.js: 1.0.833 [WebGL])" viewer.js:3569
"Warning: Trying to recover from JPX Error: Out of packets" pdf.worker.js:235

Possible duplicate of #4358.

@CodingFabian
Copy link
Contributor

its worth saying that in chrome the pdf has a pink background for me.
screen shot 2014-09-26 at 20 20 21

@yurydelendik
Copy link
Contributor

looks like they fixed that in the canary

@CodingFabian
Copy link
Contributor

its a bit nasty to dig into the decoding. Is the spec really only available for purchase?

what I saw so far is that it seems to correlate with the TODO here:
https://github.com/mozilla/pdf.js/blob/master/src/core/jpx.js#L72

case 0x636F6C72: // 'colr'
 // TODO

ok the colorspace header is not parsed but skipped. it says srgb anyway so thats not an issue.
i have a patch added some warn logging in the todo places and i git a bit more info whats wrong.

@CodingFabian
Copy link
Contributor

i got a patch. i am not sure if thats correct, but it makes the picture readable.
with the patch there still seems to be a problem with the last part of the image similar to #4358
screen shot 2014-09-26 at 23 10 02

CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Sep 26, 2014
This patch makes the image from mozilla#5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Sep 26, 2014
This patch makes the image from mozilla#5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Sep 27, 2014
This patch makes the image from mozilla#5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Oct 16, 2014
This patch makes the image from mozilla#5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Oct 16, 2014
This patch makes the image from mozilla#5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Oct 21, 2014
This patch makes the image from mozilla#5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Oct 21, 2014
This patch makes the image from mozilla#5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
CodingFabian added a commit to CodingFabian/pdf.js that referenced this issue Oct 21, 2014
This patch makes the image from mozilla#5349 appear correctly, the artefacts
for the last packet are fixed in mozilla#5426.
This patch also optimizes some "in-checks" and adds a few header parsings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants