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.
style="-webkit-print-color-adjust:exact;"
e.g. the full tag might be:
Now when you print, background colors will not be modified.
Richard Nichols is an Australian software engineer with a passion for good design and simple solutions.
You could follow him on twitter or subscribe by RSS or email.
There are 5 comments.
Add a comment