semi-transparent elements are printed to PDF as blurry, low-resolution image fallbacks

RESOLVED FIXED

Status

()

Core
Graphics
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Ilja Sekler, Assigned: roc)

Tracking

({regression})

unspecified
x86
Linux
regression
Points:
---

Firefox Tracking Flags

(blocking2.0 final+)

Details

(Whiteboard: [softblocker], URL)

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.11) Gecko/20101013 Ubuntu/10.10 (maverick) Firefox/3.6.11
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:2.0b9pre) Gecko/20100101 Firefox/4.0b9pre

Elements with opacity < 1 are printed with blurry (text almost illegible) image fallbacks, when using in-tree cairo. In builds using system cairo 1.10, these elements are just blank (but fallback images are there, one can drag'n'drop them from evince, though they are blank).

The last good nightly build dates from 2011-01-02, so one of the numerous checkins in <http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2011-01-02+09%3A00&enddate=2011-01-03+03%3A00> (Bug 363861, Bug 593604 or Bug 602757) might have caused the regression.

Reproducible: Always

Steps to Reproduce:
1. Print the $URL to a PDF file

Actual Results:  
Semi-transparent elements (class .posted) are printed with blurry image fallbacks (in-tree cairo), the text in these elements is almost illegible and the size of the resulting PDF file is huge.

Expected Results:  
The text in semi-transparent elements is not mangled to a low-resolution bitmap, remains clear and legible.

This bug doesn't happen if the semi-transparent element has <body> as a direct ancestor.
(Reporter)

Comment 1

7 years ago
Created attachment 502254 [details]
good PDF with 2011-01-02 nightly
(Reporter)

Comment 2

7 years ago
Created attachment 502255 [details]
bad PDF with 2011-01-08 nightly
(Reporter)

Updated

7 years ago
Keywords: regression
Assignee: nobody → roc
blocking2.0: --- → ?
Created attachment 502459 [details] [diff] [review]
fix

This fixes it.
Attachment #502459 - Flags: review?(jmuizelaar)
Created attachment 502460 [details] [diff] [review]
fix v2

Oops, fix comment.
Attachment #502459 - Attachment is obsolete: true
Attachment #502460 - Flags: review?(jmuizelaar)
Attachment #502459 - Flags: review?(jmuizelaar)
Whiteboard: [needs review]
Attachment #502460 - Flags: review?(jmuizelaar) → review+
Marking as ASSIGNED since, well, there's already a proposed patch.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
blocking2.0: ? → final+
Keywords: checkin-needed
Whiteboard: [needs review] → [needs landing]
Whiteboard: [needs landing] → [needs landing][softblocker]
(Reporter)

Comment 6

7 years ago
Thank you very much for the fix. Is unselectable text in areas with transparency in the "good PDF" file a limitation of PDF format or a gecko/cairo bug?

I filed this bug only about PDF keeping <https://bugzilla.mozilla.org/show_bug.cgi?id=536282#c3> in the back of my mind, PS still remains the default output format and the results of printing <http://weblogs.mozillazine.org/asa/archives/2010/12/new_firefox_4_betas.html> to a physical printer look as poor as the "bad PDF". Any chance to review and land <https://bugzilla.mozilla.org/show_bug.cgi?id=462872#c4> soon?
Karl's working on that review, but he's been taking holiday days so it'll be maybe a week more.

IIRC when I opened my test PDF in evince I could select the text.
(Reporter)

Comment 8

7 years ago
Created attachment 503316 [details]
Transparent parts of PDF not selectable

Screenshot of Evince 2.32.0 with Attachment <https://bugzilla.mozilla.org/attachment.cgi?id=502254> on Ubuntu 10.10 after hitting Ctrl+A: parts of the PDF with transparency ("Posted by:") are not selected. Text in these parts does not appear in the output of pdftotext as well.
Please file a new bug for that.
(Reporter)

Comment 10

7 years ago
(In reply to comment #9)
> Please file a new bug for that.

Filed bug 625852.
http://hg.mozilla.org/mozilla-central/rev/4df430b64d1b
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing][softblocker] → [softblocker]
You need to log in before you can comment on or make changes to this bug.