The Daily UserScript: Remove Print CSS (WYSIWYG)

This userscript removes all CSS that is only for media="print", and makes the media="..screen.." into media="...screen..., print" so that what you see on the screen is what you will get for your print out of the page.

The Unpleasantry:

Currently if you print a webpage (or go to print preview) you may notice that most sites do not look the same as they do on the screen when you try to print one of their pages. This is because the page has CSS specifically designated for media="screen" which is different than the CSS they use for media="print".

The Alleviation:

Once you install the "Remove Print CSS (WYSIWYG)" UserScript there will be a Greasemonkey menu command that you can use called 'Remove Print CSS' which removes the media="print" CSS and makes the media="...screen..." CSS media="...screen..., print" CSS, which means that the same CSS used for your screen will be used when you try to print a page.

Greasemonkey Ubiquity Command Method

I previously released a Greasemonkey Ubiquity command which you can use with this userscript.

  1. Hit your Ubiquity hotkey
  2. Type "gm Remove Print CSS" in the Ubiquity command prompt.

Screen Shot

Notes

Firefox does not print background colors or images by default, so you must change this manually if you wish to print backgrounds, in order do to so:

  1. Go to the "File" menu in Firefox, and then "Page Setup".
  2. When the "Page Setup" multiple tabbed dialog box appears, go to the "Format & Options" tab.
  3. In the the "Options" section towards the bottom, check the "Print Background (colors & images)" option.

© Erik Vold 2007-2010. Contact Erik Vold. Top ^