9.24 KB, application/pdf
34.42 KB, application/pdf
28.40 KB, application/pdf
21.49 KB, application/pdf
204.63 KB, application/zip
User-Agent: Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8 PNG images with alpha transparency are printed as if against a solid black background (regardless of the page or image background color). PNG images with binary transparency seem to be handled correctly. http://www.darkknight.net/contact/index.html contains PNG images of both types. Reproducible: Always Steps to Reproduce: 1. Load a web page (sample given) in the Firefox browser 2. Print the page (to file or to printer) 3. Examine the output Actual Results: On Linux, PNG images with alpha transparency are not reproduced at all (printing of background images and colors was enabled). Images with binary transparency printed correctly. Images with alpha transparency showed black banding or were completely black (depending on content). Expected Results: A better behavior would be to composite the images against white first (this would at least save toner). Firefox should actually composite the image first unless the printer driver can be verified to support alpha transparency. Images used as backgrounds should be reproduced when the option to do so is selected.
Created attachment 141865 [details] Output sample from Firefox on Linux In page setup, selected "Print Background (colors & images), then printed the page to a file. This matched with the hard copy. Converted the file to PDF format with 'ps2pdf mozilla.ps firefox_linux.pdf' to simplify viewing across platforms.
Created attachment 141866 [details] Output sample from Firefox on Windows In page setup, selected "Print Background (colors & images), then printed the page to the printer. Printed the page again using Adobe Acrobat 6.0 Professional.
Created attachment 141867 [details] Correct output from (surprisingly) MSIE MSIE not only surprised me by displaying the images correctly, but it also printed them correctly to hard copy and to PDF.
confirmed with linux trunk 20040220 see also bug 141656 (ps, xprint both do the same thing here) reassigning
This bug may be causing Google Map direction lines to print poorly in Firefox, e.g. if there is a line showing the path of travel it is printed with a black background.
*** Bug 310288 has been marked as a duplicate of this bug. ***
Created attachment 197693 [details] Another example of incorrect output, Firefox 1.5b on Windows PDF-Printout of http://www.bundeswahlleiter.de/bundestagswahl2005/ergebnisse/bundesergebnisse/grafik_sitze_99.html
If Bug 310288 is a duplicate, OS should be changed to ALL.
*** Bug 311233 has been marked as a duplicate of this bug. ***
*** Bug 314153 has been marked as a duplicate of this bug. ***
*** Bug 315079 has been marked as a duplicate of this bug. ***
http://www.bundeswahlleiter.de/bundestagswahl2005/ergebnisse/bundesergebnisse/grafik_sitze_99.html has no transparency any more. We decided to make background white opaque to prevent the problem, so it cannot be used as test case any more.
There are plans for some core layout issues with printing that will be addressed for Gecko 1.9, but not on branch.
*** Bug 340541 has been marked as a duplicate of this bug. ***
Does this occur because of the SVG file? My test (duplicate bug) is on Wikipedia site (http://en.wikipedia.org/wiki/DVI). In this page you can see 2 pictures of DVI connector (one on the top of the page, another in the middle of the page). I clicked the first one to see its preview but only saw a transparency grid (like you see in Photoshop, all white on IE), then clicked it again oh, I got the picture. On the other hand, the second picture was clicked, previewed (also see transparecy grid with connectors) and displayed all correctly but incorrect printed. I don't know how related about SVG and PNG but this 2 images include 'transparency'.
Created attachment 224664 [details] Test case and result Clearly that Firefox cannot handle PNG picture correctly when copying and printing.
Add to previous comment: I find out that not only the picture I mentioned is printed in black, all the PNG image files in that page are also printed in black, too. "I observe that they are only printed in black on their edge (area outside the connector edge)." Hope this can help solving this bug.
Gawd, I can't believe this bug *still* hasn't been fixed by Firefox 2 (or Bon Echo, at least). I think it should be made a blocker as it's quite a ridiculous thing that Firefox can render something to screen but not to a printer.
Its more than a little late to rearchitect printing on the branch, but I think you know that. Cairo might fix this, but that's Fx3
*** Bug 345963 has been marked as a duplicate of this bug. ***
Created attachment 245787 [details] [diff] [review] Patch fixing the png transparency problem in postscript output (obsolete gfx/ps) This patch does a color mixing of the color white and the pixel value by a mixing ratio determined by the alpha value of the pixel. This should work as long as there is no background color. I have tested it on all the various png images that I found around the Internet and it seems to solve the ugly printing problem. (My first patch to Mozilla. :-)
(In reply to comment #21) > Created an attachment (id=245787) [details] > Patch fixing the png transparency problem in postscript output > > (My first patch to Mozilla. :-) > If you want to get people to notice a patch, you generally have to ask. See http://www.mozilla.org/hacking/life-cycle.html. It's kind of sad that patches slip through the cracks like this, but that's the way it works at the moment. In this case, your patch is already out of date, because that codepath is no longer used. The new graphics code is in gfx/src/thebes.
I've investigated this, and come to the conclusion that Firefox's behaviour is correct, and Google Maps' code is incorrect. My full explanation is here: http://www.game-point.net/misc/googlemaps/ Please bug Google Maps to fix their code. I have no idea why they tell the browser to print non-transparent GIFs instead of the perfectly good transparent PNGs used on the browser screen.