Blog About Contact

Getting Chrome to Print with background colors enabled

Published Tue, 7 Aug 2012 • 10 comments

Chrome has a nice feature which allows it to "Print to PDF" without any native PDF print driver installed. This is really handy for taking "screenshots" of web pages to a portable format like PDF, however one thing which is frustrating is that background colors are forcibly removed for printing, even when printing to PDF.

This makes some sense when printing to a piece of paper, but is often not what you want for printing to PDF. Google has not provided an option to switch this behavior off, however there is a way around it.

  1. Right click somewhere in the page
  2. Click "Inspect Element"
  3. Find the top level "<body ... >" tag in the HTML document
  4. Double click and add this attribute:


e.g. the full tag might be:

Now when you print, background colors will not be modified.

About the Author

Richard Nichols is an Australian software engineer with a passion for making things.

Follow him on twitter or subscribe by RSS or email.

You might also enjoy reading -

Discuss / Comment

There are 10 comments.

Add a comment

  • {{e.error}}

Thanks for your comment!/

Valid email address required.
Posting message, please wait...