Printer-friendly pages

Posted by Pierre Igot in: Blogging
September 8th, 2003 • 4:48 pm

Some time ago I wrote that I had added a “printer-friendly version” link below each Betalogue entry. As a reader rightfully pointed out to me, although a very common approach, this was not the most elegant way of handling the screen-friendly vs. print-friendly issue for my web pages.

The “right” way to do this is actually to attach two style sheets to all my web pages: one for viewing pages on screen and one for printing them. When viewing the web pages in a standards-compliant browser, by default the browser uses the screen-friendly style sheet for displaying the web pages on screen, and automatically uses the printer-friendly style sheet for printing the same pages.

I have, of course, designed the printer-friendly style sheet so that some elements are not “displayed” (i.e. not printed) on paper — more specifically, all the stuff in the menu on the left-hand side. The printer-friendly style sheet also doesn’t use any colors, only black text and shades of gray for various accents.

The only drawback of this approach, as far as I am concerned, is that the user doesn’t get to “see” what the printed version is going to look like until it’s printed. The problem is somewhat alleviated in Mac OS X by the fact that you can always save the page as PDF instead of actually printing it or use the built-in “Preview” feature (which does the same thing, i.e. create a temporary PDF file for you to preview the printed version before actually printing it).

Of course, there’s still more fine-tuning to do. If you try to print something and notice any problems, please let me know.


Comments are closed.

Leave a Reply

Comments are closed.