Closed Bug 1492303 Opened 7 years ago Closed 5 months ago

PDF rendering at high zoom levels is blurry

Categories

(Firefox :: PDF Viewer, defect, P1)

defect

Tracking

()

VERIFIED FIXED
137 Branch
Tracking Status
firefox137 --- verified
firefox138 --- verified

People

(Reporter: googoldinges, Assigned: nicolo.ribaudo)

References

Details

(Whiteboard: [pdfjs-zoom][pdfjs-canvas-size])

Attachments

(7 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 Build ID: 20180830143136 Steps to reproduce: Steps to reproduce: 1. Open a PDF in Firefox 2. Zoom in to 1000% (the maximum, so the effect is best visible on this zoom level) You should now see pixels, how big the pixels are depends on the PDF 3. Download the PDF (keep Firefox open) 4. Open the downloaded PDF with a PDF viewer that is installed on your computer (in my case Adobe Acrobat Viewer DC, but can be any other) 5. Zoom in on your PDF viewer to 1000% or higher, and compare Actual results: On the Firefox side, you see pixels where there should be none, because it are vectors (like in .svg files) The comparing part is because there could always be pixels in the real file, e.g. in photos, but also badly designed things which could be done in vectors. Expected results: The vectors should be respected in PDFs in Firefox, like is also done in .svg files (.svg files look just fine if you zoom in)
Component: Untriaged → PDF Viewer
We currently limit the size of the canvas that PDF.js creates. This means at a certain scale we just use CSS to achieve scaling instead of re-rendering. To fix this we'll need to implement a way of only drawing a portion of the viewport so we don't create giant canvases.
Priority: -- → P3
Severity: normal → --
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 62 Branch → Trunk
Type: defect → enhancement
Summary: PDFs in Firefox's native PDF viewer show pixels instead of vectors → Improve PDF rendering at high zoom levels

Doing this could also help with bug 1729199.

See Also: → 1729199
Whiteboard: [pdfjs-zoom][pdfjs-canvas-size]
See Also: → 1720282
See Also: 1729199
Duplicate of this bug: 1654612

Post currently top of Firefox subreddit highlighting the poor comparison to Edge.
https://www.reddit.com/r/firefox/comments/12rtwri/why_does_edge_display_pdfs_better_than_firefox/

See Also: → 1713266
Severity: -- → S2
Summary: Improve PDF rendering at high zoom levels → PDF rendering at high zoom levels
Summary: PDF rendering at high zoom levels → Improve PDF rendering at high zoom levels
Duplicate of this bug: 1863302
Type: enhancement → defect
Summary: Improve PDF rendering at high zoom levels → PDF rendering at high zoom levels is blurry

(In reply to Brendan Dahl [:bdahl] from comment #6)

We currently limit the size of the canvas that PDF.js creates. This means at
a certain scale we just use CSS to achieve scaling instead of re-rendering.
To fix this we'll need to implement a way of only drawing a portion of the
viewport so we don't create giant canvases.

In the meantime, would it be possible to implement an about:config flag to increase the size of the canvas for PDF.js? This would be hugely valuable for users less concerned with performance constraints and more interested in not having to switch applications for workflow.

Also, here is one additional URL that renders very poorly in PDF.js compared to other PDF renderers: https://www.vanshnookenraggen.com/_index/docs/NYC_full_trackmap.pdf

https://github.com/mozilla/pdf.js/pull/17837 should help this by increasing the maximum size.

Duplicate of this bug: 1892861
No longer duplicate of this bug: 1892861
Assignee: nobody → nicolo.ribaudo
Status: NEW → ASSIGNED
Priority: P3 → P1

Finally that problem will be addressed?! As hint: it is not only on high zoom levels, also on printing the PDF the blurry is visible, see 1863302

We are currently working on a fix that improves the quality on screen, but not when printing.

No longer duplicate of this bug: 1863302
No longer depends on: 1949972
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
See Also: 1713266
Duplicate of this bug: 1843426

Hello! I have managed to reproduce the issue with firefox 135.0a1(2025-01-01) on Ubuntu 22.04.

I can confirm that the issue is fixed with firefox 138.0a1(2025-03-20), 137.0b8 on Ubuntu 22.04, MacOS 15.2 and Windows 10, updating the flags accordingly and marking this issue as VERIFIED->FIXED.

Have a nice day!

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: