-
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
Document is blurry #14724
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
HI @luisberth , I just tried it in firefox and it appears the same. The text is similarly blurry and the document is clipped halfway down. |
Hello, I also confirm the issue on a Linux Debian Bookworm 64bits with Firefox 98 and the embedded PDF.js reader (v2.13.93). |
I noticed this also, in my case always returning true here made it better: https://github.com/mozilla/pdf.js/blob/master/src/display/canvas.js#L1045 |
I think the text blurriness is due to: Line 2667 in 0dd6bc9
where there is a scaleY !== 1 and very likely it's the same cause for the images.
|
We are having the same issue. Text in high quality images in the pdf is not rendered properly. We have tested the pdf in the web viewer (https://mozilla.github.io/pdf.js/web/viewer.html) to check if we were rendering incorrectly, but have found the same behaviour occurs there. |
Hi calixteman! I was wondering (hoping?) if there was any progress on this? We're seeing it on a fair number of documents (some worse than others). Interestingly, it seems like this might be a regression - we have a very old version of pdf.js (1.10.129) that doesn't exhibit the blurriness (at least for one document I've looked at) Thanks! |
I just noticed this stems from Firefox. I've noticed now on a few financial websites that when I attempt to view OR PRINT a PDF directly from Firefox, the result is blurry and unusable. Instead I have to download the PDF and then print it from Acrobat Reader to get a crisp printout. I also found these other bug reports which seem to be about the same problem: |
This is a different problem, what you're seeing is https://bugzilla.mozilla.org/show_bug.cgi?id=1274502 (https://bugzilla.mozilla.org/show_bug.cgi?id=1774631 or https://bugzilla.mozilla.org/show_bug.cgi?id=1777209), which are fixed in Firefox 104.
Yes, this is a duplicate of #14147. |
@marco-c I'm a little confused - as reported, this ticket repros in Google Chrome. |
It also reproduces in Firefox, the underlying bug is the same. |
Hi @calixteman How can we fix the problem, seems I can still reproduce the issue. |
This issue is not closed because it was fixed, it was closed as a duplicate of #14147. |
In order to handle correctly transparency, we use some intermediate canvas and sometimes they can be too big. Line 2885 in de7d1d2
In the pdf attached to this issue, the bounding box used to compute the canvas dimensions is [ 0, 0, 5950, 50210 ] and the height here is a way too big.
|
@calixteman So what is the recommended size(height) for the canvas dimensions? |
This looks to be a duplicate of #14982. It is fixed by disabling this block: pdf.js/src/display/canvas.js |
…r not It fixes issues mozilla#14982 and mozilla#14724. The main problem of upscaling a canvas is that it can induces some pixelation (see issue mozilla#14724). So this patch is just removing the limit and as a side effect it fixes issue mozilla#14982. As far as I can tell, in looking different profiles (especially some memory profile) in using the Firefox profiler, I don't see any noticeable difference in term of memory use.
Attach (recommended) or Link to PDF file here:
Infographic_EAP_EN_v2 (1).pdf
Configuration:
Chrome Version 99.0.4844.51 (Official Build) (x86_64)
macOS Catalina 10.15.7
Repros with version at PDF.js Demo Viewer
No
Steps to reproduce the problem:
This is how the document appears in Adobe Acrobat Reader:
This is how it appears in the viewer. (Please view in full size) Note the lack of crispness of the text in particular.
![image](https://user-images.githubusercontent.com/22301903/160471285-829fea1b-45dd-471b-8908-4bc4049f7a31.png)
Thank you!
The text was updated successfully, but these errors were encountered: