Last modified: 2012-02-21 11:12:17 UTC
As described on [[Wikipedia:Village pump (technical)#Black background]], when
printing the PNG file generated from a SVG image on Firefox 1.5, the transparent
areas show as black instead of the expected color. While this is a bug on
Firefox (it's ignoring the alpha channel), a workaround would be useful. The
attached patch to librsvg-2.11.1 is a quick and dirty hack to change the default
color of the image from fully transparent black to fully transparent white, with
the result that, when printing on Firefox, the transparent areas of the image
show as white.
Created attachment 1385 [details]
Patch to librsvg-2.11.1 to change the default color from transparent black to transparent white
rsvg-art-render.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)
Note: lightly tested (only with [[Image:Mitochondrie.svg]]). Assumes
The current rendered image prints fine from Firefox 22.214.171.124 on Mac OS X.
Is this specific to Linux printing? My PC's being used this weekend so
I can't test it for a couple days...
It was originally reported on Windows Firefox 1.5, and I reproduced it on Linux
Firefox 1.5 (in fact 126.96.36.199). I guess the printing code is different for each
platform (Windows probably has to use GDI, while on Linux it directly generates
Confirmed on Linux and Windows. Maybe everyone should upgrade to a Mac. ;)
Off to test patches and updated rsvg...
Output from patched librsvg seems to work for Firefox on Linux, but not on Windows.
(Tested with generic .ps output on Linux and saved output from LaserJet 4MP driver
on Windows XP, as I can't figure out how to get my PC and my Mac to talk to each
other regarding printers. Bleah!)
Submitted a feature request upstream:
The upstream developer has marked our feature request as WONTFIX. I suggest we
continue to maintain our patch.
*** Bug 12442 has been marked as a duplicate of this bug. ***
On Firefox 3 the bug has been fixed.
This also occurs on Firefox 188.8.131.52 on Windows XP Media Edition (similar to XP Professional).
Assigning SVG bugs to Ariel -- need a cleanup pass to see what's fixed up by a librsvg upgrade, what can be resolved with fixes to our font configuration, what can be fixed on our end, and what still needs to be pushed upstream.
According to Platonides this is fixed in Firefox 3. I don't see why we should keep this open any longer. Not much we can do here.