Closed Bug 1759715 Opened 3 years ago Closed 3 years ago

The pdf is loosing quality on some pages, which is not the case on other navigators

Categories

(Firefox :: PDF Viewer, defect)

Firefox 98
defect

Tracking

()

VERIFIED FIXED
100 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- verified

People

(Reporter: ali.h.elzein, Assigned: lsalzman)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

I uploaded two pdf files on my project website.

Actual results:

When I open them on firefox, some pages (in both documents) are loosing quality.

Expected results:

The quality should remain the same for all pages as it was on the pdf originally.

Summary: The pdf is loosing one some pages, which is not the case on other navigators → The pdf is loosing quality on some pages, which is not the case on other navigators

The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → PDF Viewer

Could you upload the PDFs here?

Flags: needinfo?(ali.h.elzein)

(In reply to Marco Castelluccio [:marco] from comment #2)

Could you upload the PDFs here?
You can find the two pdfs at the following link :
https://web.msh-lse.fr/covimob/page-2/
Thank you

Flags: needinfo?(ali.h.elzein)
Attached image image.png

The text on page 1 is really badly rendered on windows 11.

Attached image image.png

The colors on the chart on page 2 are not the same as in Acrobat (on the left).
There is an aa issue on page 3 on the chart in the bottom right (orange & green curves)

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Ever confirmed: true
Flags: needinfo?(lsalzman)
Keywords: regression
Regressed by: 1642583

Jonathan, ideas?

Flags: needinfo?(lsalzman) → needinfo?(jfkthame)
Flags: needinfo?(lsalzman)

Odd -- it looks like the same (embedded Type 1) fonts are used throughout, but on some pages only, they render really poorly on Windows. (On macOS, I don't see any obvious difference between the pages.)

On the "bad" pages, it looks like the font is being rendered without any hinting or antialiasing. Could we be hitting a "render glyphs as paths" codepath for some reason?

I also notice that if I do a Print / Save to PDF operation with this document, it appears to generate a pre-rasterized PDF file (which faithfully reflects the poor rendering on some pages, but even the "good" pages are bitmapped rather than containing real fonts and glyphs).

I'm not sure what it is about this PDF that is causing us to hit the rasterize-and-render-as-bitmap codepath, but given the regression range in comment 7, it seems like clipMask and/or blendMode would be the places to start looking.

Flags: needinfo?(jfkthame)

It seems as if any attempt to use PushLayer with the Blend effect causes alpha
to be incorrectly blended. Using FillGeometry explicitly with the clip geometry
and D2D1_PRIMITIVE_BLEND_COPY seems to work around this.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f508fc21db01 Avoid using layers with D2D blend effect. r=aosmond
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Flags: needinfo?(lsalzman)
QA Whiteboard: [qa-100b-p2]

Reproducible on Firefox 98.0(20220304153049) on Win10 64-bits. Verified as fixed on Firefox 100.0(20220428192727) and Nightly 101.0a1(20220501190841) on Win10 64-bits. MacOS and Linux seem to be unaffected.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-100b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: