18
Override “Print Background Colors and Images” Option in Browser
Web development
Tags: browser, IE
Share
Internet Explorer and Firefox, to name a few, have an option that allows for the printing of background colors and images. The user can check this option to override the print style sheet and print the backgrounds that were removed to increase legibility, protect copyright, or whatever other reason was necessary.
By default, this option is off in browsers and the user has to manually check a box. In IE it is under Tools, Internet Options, Advanced, Printing. In Firefox it is in Page Setup of the Print Preview window.
Here is what is looks like in FF:

To prevent the browser from printing backgrounds when this is checked, add the following to your print style sheet:
* {
background-color: white !important;
background-image: none !important;
}
Now, I’m not one to take all control away from the user, but there are situations when you must.
No related posts.
2 Comments for Override “Print Background Colors and Images” Option in Browser
I'm not sure we need to do this but I am sure a lot of people would like to protect their copyrights using this method. Most people never think about the fact that anyone might print out there material, but it helps to keep in mind that many people do print pages and pictures from websites frequently.
@canvas print
Agreed. Like I said in the last line of the post, there may be situations when you must. It is not something I prefer to do.
Leave a comment
« ColdFusion Example: Session Timeout Warning with jQuery/JS | jQuery.ajax and jQuery.post Form Submit Examples with PHP »

canvas print
February 4, 2010