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

PDF Displaying not displaying properly #8245

Closed
aidlo opened this issue Apr 6, 2017 · 9 comments · Fixed by #13991
Closed

PDF Displaying not displaying properly #8245

aidlo opened this issue Apr 6, 2017 · 9 comments · Fixed by #13991

Comments

@aidlo
Copy link

aidlo commented Apr 6, 2017

Link to PDF file (or attach file here):
document.pdf

Configuration:
Web browser and its version: Firefox 52.0.2 (32-bit)
Operating system and its version: Windows 10
PDF.js version: Using version bundled with Firefox

Steps to reproduce the problem:

  1. View Attached PDF with PDF.js in Firefox
    Similar Issue Unrecognisable Blurry Image #8083

What is the expected behavior? (add screenshot)
Adobe Reader correctly shows the image and isn't blurry. PDF.js does not. See screenshots for comparison.

screenshot correct

What went wrong? (add screenshot)
screenshot

The image in the PDF is an Indexed xobject. not sure if this is the issue.

@THausherr
Copy link
Contributor

This is not related to #8083, that one was about patterns with giant steps. Here there's no pattern, only a very small image that is extremely blown up.

@aidlo
Copy link
Author

aidlo commented Apr 10, 2017

This was a small image (10x10 pixel) for a quick example. It happens with bigger more complicated images also.
Have had similar problems when working with other image code where dithering was used instead of the indexed palette.

@THausherr
Copy link
Contributor

Here's another. That one has inline images with 1 bit /DeviceGray.
inline.pdf
The file is created by the PDFBox build tests and thus Apache licensed.

@aidlo
Copy link
Author

aidlo commented Apr 10, 2017

Sample open as intended in Goggle Chrome.
Bug may just be in the Firefox implentation.

@aidlo aidlo closed this as completed Apr 10, 2017
@aidlo aidlo reopened this Apr 10, 2017
@THausherr
Copy link
Contributor

I have it blurry on chrome when using https://mozilla.github.io/pdf.js/web/viewer.html .

@aidlo
Copy link
Author

aidlo commented Apr 10, 2017

It is down to the imageSmoothingEnabled property being enabled by default CanvasRenderingContext2D.imageSmoothingEnabled
Turning off smoothing for the canvas and everything looks correct.
mozImageSmoothingEnabled = false; webkitImageSmoothingEnabled = false; msImageSmoothingEnabled = false; imageSmoothingEnabled = false;

@aidlo
Copy link
Author

aidlo commented Apr 10, 2017

Created a JSFiddle to demostrate Demo

@SamyCookie
Copy link

Maybe it is related to #3331 (blurry lines), I have deduced the same conclusion on that bug.

@aidlo
Copy link
Author

aidlo commented Apr 24, 2017

How can I get this fixed?

brendandahl added a commit to brendandahl/pdf.js that referenced this issue Sep 10, 2021
… 1722191)

While some of the output looks worse to my eye, this behavior more
closely matches what I see when I open the PDFs in Adobe acrobat.

Fixes: mozilla#4706, mozilla#9713, mozilla#8245, mozilla#1344
bh213 pushed a commit to bh213/pdf.js that referenced this issue Jun 3, 2022
… 1722191)

While some of the output looks worse to my eye, this behavior more
closely matches what I see when I open the PDFs in Adobe acrobat.

Fixes: mozilla#4706, mozilla#9713, mozilla#8245, mozilla#1344
rousek pushed a commit to signosoft/pdf.js that referenced this issue Aug 10, 2022
… 1722191)

While some of the output looks worse to my eye, this behavior more
closely matches what I see when I open the PDFs in Adobe acrobat.

Fixes: mozilla#4706, mozilla#9713, mozilla#8245, mozilla#1344
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