6.12 KB, image/png
252.13 KB, application/pdf
730 bytes, patch
|Details | Diff | Splinter Review|
804 bytes, image/png
When you print a web page that contains images with transparent backgrounds, the image background is always printed as black. The page displays fine in print preview. I have noticed this on various sites and with various printers. The problem does not occur with Firefox 126.96.36.199. The Yahoo! home page listed above is an example of a page with such an image.
This testcase: https://bugzilla.mozilla.org/attachment.cgi?id=216496 from bug 331941 also exhibits the issue.
(In reply to comment #1) > This testcase: > > https://bugzilla.mozilla.org/attachment.cgi?id=216496 > > from bug 331941 also exhibits the issue. > Hmm, oddly this testcase fails with Firefox 188.8.131.52 also, so perhaps there is an additional issue effecting .ico files. However the http://www.yahoo.com prints correctly under Firefox 184.108.40.206, yet under current trunk, the Yahoo! logo image incorrectly prints with a black background.
Created attachment 251529 [details] Test PNG image that illustrates the issue Printing the attached PNG image with current trunk shows the issue. This image prints correctly with Firefox 220.127.116.11.
12 years ago
Assignee: nobody → pavlov
Flags: blocking1.9? → blocking1.9+
Created attachment 255470 [details] PDF showing black background In addition to transparent backgrounds in images showing up as black when printed, background of text appears black when printed. I used a "print to PDF" drive to create the attached PDF, but the Web page prints identically on my Canon iP4200 printer. The original Web page is at http://waltonfeed.com/grain/faqs/ivb.html . Note in the PDF that the text and the palm tree graphic both have black backgrounds when they should be transparent.
Created attachment 261704 [details] [diff] [review] only allow blits from screen DCs, never from printer DCs This should fix it, though I'm not super happy about the patch.. but the chances of there being a printer driver that supports bitblt from its DC isn't very good, so this should be safe.
Assignee: pavlov → vladimir
Status: NEW → ASSIGNED
Attachment #261704 - Flags: review?(pavlov)
Printing reftest, perhaps?
And we have an automated way to print a page and scan it in and compare it with a previously printed and scanned image?
No; <http://lxr.mozilla.org/mozilla/source/layout/reftests/printing>. I have no idea whether that would work here or not, but if it doesn't, there's surely another way to test this, even if it's harder to make it work.
(In reply to comment #9) > <http://lxr.mozilla.org/mozilla/source/layout/reftests/printing>. That wouldn't work; that renders to the screen. (It's primarily meant for testing page breaking.)
12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
I did a test in the Gran Paradiso (beta 5) version and transparent background are not black but white.. Png tranparency seem still to be a problem !
(In reply to comment #11) > I did a test in the Gran Paradiso (beta 5) version and transparent background > are not black but white.. Png tranparency seem still to be a problem ! Please file a new bug with a testcase.
This is back in full force now that Cairo 1.5 has landed on the trunk.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Yea, it looks like the fix got reverted when Vlad next upgraded Cairo, though it was before cairo 1.5
Reapplied patch. Missed it somehow when doing the cairo upgrade, sorry!
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago → 11 years ago
Resolution: --- → FIXED
Created attachment 292802 [details] Example of alpah transparency printing black on Firefox 18.104.22.168 This example uses alpha transparency instead of index transparency. The transparent area always prints solid black. Tested using Firefox 22.214.171.124 .
All tests of the index transparency were performed over the network using the following printers: HP LaserJet 4000n HP LaserJet CP4345xs HP LaserJet CP3505dn I noticed this bug is listed as resolved fixed, but it seems that might have been a bit premature, I hope someone is still watching this bug.
I, too, hope that someone is still watching this bug, as I am experiencing behavior that appears to be exactly this. It appears to be fine on my linux box, but on my WinXP box, I am getting a black bar around the image. There are probably other ways to get this, but this is how it is occurring for me. I have tested some of the images attached to this and it appears to not be happening with the first image (turtle) but it is occurring with the last image (A) STR: 1) Create a page with a canvas on it. 2) Use toDataURL to convert the canvas to an image 3) Display the image URL, do a print preview and notice all looks fine 4) Print the image and notice the black bars/background/etc that should not be there Expected: The printed version of the image should look like the print preview with no black showing Observed: The printed version has a black box around the image, which is different than the print preview which does not show this. Extra info: WinXP Pro SP2 FF 126.96.36.199 As you can see, the behavior appears to be this bug. If it is not, let me know and I'll gladly open a new one.
Leanan, this was about a bug that was happening on trunk (Firefox 3), so what you are experiencing with Firefox 2 is certainly not this bug.
Thunderbird 188.8.131.52 is producing the same result. Viewing the email and print previewing the email appear normal. Printing the transparent PNGs result in black backgrounds. Extra info: Win XP Pro
You need to log in before you can comment on or make changes to this bug.