Closed Bug 276071 Opened 20 years ago Closed 20 years ago

CSS background images don't print at all, even with Print Background set

Categories

(Core :: Printing: Output, defect)

1.7 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: schoen, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041201 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041201 Firefox/1.0

I found that pages that use CSS background images with CSS background-image
don't show any of the CSS background images when printed in my Firefox 1.0 on
Linux (nor from Mozilla 1.7.5 on Linux, nor from a somewhat older Mozilla on Linux).

Firefox and Mozilla display these images correctly on screen, but they do not
appear in printed output (nor in the Postscript files produced by "Print to file").

I set the "Print background (colors and images)" option in my Page Setup.  When
I do this, the CSS background image renders properly in Print Preview.  However,
it is still completely absent from printed output.

I don't think this is just a scaling issue, as with some other bugs, because
when I print a page that uses large PNG file as my background image, the
PostScript files produced by "Print to File" are substantially smaller than the
PNG file!

Reproducible: Always

Steps to Reproduce:
1. Load a page that defines a CSS style including a background-image (either a
GIF or a PNG, either local via file:// or remote via http://) and then applies
that style to a paragraph or other object containing text.
2. In File/Page Setup, enable "Print Background" option.
3. Choose File/Print Preview and observe background images properly rendered.
4. Choose File/Print... and observe background image absent from printed output.
Actual Results:  
CSS background image was rendered in Print Preview but not in printed output.

Expected Results:  
CSS background image should be rendered in printed output.  (Setting media=all
or media=print in the CSS style definition does not help.)

I have also written an account of this bug on my blog at
http://vitanuova.loyalty.org/weblog/nb.cgi/view/vitanuova/2004/12/17/0

including an HTML snippet that triggers it, and screenshots of the Print Preview
display contrasted with the Print to File rendering of the same page.

The Mozilla 1.7.5 and Firefox 1.0 that exhibit this problem on this machine were
built from source by Gentoo; the earlier Mozilla on another machine (don't have
the version number available here) was the official Red Hat build from around
two years ago, and seems to have identical behavior.
Assignee: firefox → core.printing
Component: General → Printing
Product: Firefox → Core
QA Contact: firefox.general
Version: unspecified → 1.7 Branch
Also the same behavior (Print Preview doesn't match printed output) in

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5
This has been fixed on trunk since then, apparently.... Both trunk firefox and
trunk Mozilla builds (eg 1.8a6) print the background fine over here.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Thank you, I agree that this bug has been fixed as of the current nightly build.
You need to log in before you can comment on or make changes to this bug.