Make your blog printer friendly!
On November I saw on digg a link to Dave Child’s mod_rewrite cheat sheet. While visiting his blog I found out a comprehnsive collection of cheat sheet and a blog post about making printer friendly pages using CSS. I was amazed to find out that CSS allows authors to create media-specific styles for a single document. This with the display:none CSS declaration made things easy to implement a printer friendly version of your blog (or website, of course).
I searched the web for a generic printer friendly CSS for Wordpress or something similar, but found nothing. I did find some helpful resources like:
- Codex: Styling for Print - explanations, samples and links
- Aleeya.Net: CSS Printer Friendly for Wordpress - a sample CSS (didn’t work on Cutline theme) an some tips on how to make your own CSS.
- A List Apart: Going to Print - article by A List Apart on how to make a CSS for printer-friendly page version.
After reading this , I understood that there’re no shortcuts - I will have to make a CSS suitable for my theme by myself. I decided to make a printer-friendly CSS for the Cutline Theme (see it working on Opher Brayer’s Blog). Although I’m not a CSS expert it wasn’t that hard, and didn’t took more than 1 hour.
The process of making the new CSS are as following:
- Make a copy of the original CSS file (usually style.css) and name it print.css.
- Now go through the CSS and replace every styling that seems that doesn’t need to be on the paper with display: none. (see sample).

- Now edit your Header.php file and add to it the line :
- From this point you can start testing your results. Just open any of your posts in a web browser, and watch the print-preview (usually available in the File menu). You will probably see still some stuff that shouldn’t be there, bad font sized, etc… What I did is using A List Apart recommendations and tips - setting the background color to white, making all my font size 12pt, adjusting links colors, removing the heading font sizes (so that they will be adjusted to the main font size) and so on.
- I did some adjustments to the footer.php file too:
- I put the “Cutline by Pears…” notice in a div, so that I can make it vanish in the printer version.
- I added the permalink there, so that it will be printed with the text. I had to modify the original style.css to make it invisible on the screen-version.
- Added the printer friendly web site Pixel Badge (see below).
- Also I made the text float around the images, so it will save space…
- There’s a trick to make the link address appear with the link title, but I didn’t like it so I didn’t add it to my CSS. You can see a sample of how doing this on the A List Apart article.
That’s it! You can download the CSS I made along with all the modified files in one small ZIP file - Cutline_PrinterFriendly.zip.
Because currently the user can’t know if the site uses a different CSS file without reviewing the sourcecode of a page, I’ve
created a Pixel-Badge (using CoolText) that states that the page is Printer-Friendly.
![]()
(available on Flickr - just click on the badge)
I’ve created a section on the mentioned above Codex page named “Themes with Printer Friendly CSS” . I welcome you to post there links to printer friendly themes and printer friendly CSS files for themes made by others.
On next week I’m planning making fUnique theme printer friendly (that’s the theme that being used on this blog).
I hope this will help you, and of course - your comments are very welcomed.
Arik
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.
Trackbacks & Pingbacks
[…] (if you want the technical details click here) […]
[…] אני לאחרונה התחלתי לכתוב בבלוג באנגלית - Obvious Ideas, והיום כתבתי שם מדריך די מפורט על איך לעשות שהפוסטים שלכם יודפסו כמו שצריך (בלי כל המסביב שלא צריך - רק הכותרת והתוכן), בלי ליצור עמוד נפרד בשביל המדפסת. בעקרון זה מתבסס על היכולת לציין CSS נפרד לסוגי מדיה שונים (מסך, מדפסת, טלויזיה, ברייל וכו‘). פרטים נוספים - כאן. […]
[…] Make Your Blog Printer Friendly (מתוך Obvious Ideas) - אריק מאריק מתבטא כותב גם באנגלית ומסביר כיצד לבצע שינויים ב-CSS כדי להפוך את הבלוג לידידותי להדפסה, מבלי הצורך ליצור ”עמוד להדפסה“. מומלץ למי שלא מפחד מ-CSS. […]
Comments
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

I’m trying to make my blog print friendly and your post was very helpful. Just wanted to say thanks for the information.
Happy to help, Ken.
Arik,
Our church/school has asked me to use Wordpress as the vehicle to put our monthly newsletter online on our website. I have no experience with this product yet, but it sounds awesome. This way the Pastors and other lay-members who submit articles and information can log in themselves and post their articles instead of just sending them to a secretary to layout for the newsletter. However, not everyone in our congregation has a computer with internet access so we would still like to offer them a paper newsletter. The problem is, we don’t wish to duplicate our efforts.
To this end, I’m trying to find a template or CSS code that we could use that would pull all entries that were submitted to the blog within a single calendar month and display them in a sort of newletter-like layout for print.
Do you know of anyone who has made such a thing or know anyone who could design something like this?
Thanks!
Troy
Hello!
Recently I have made a post where I where I show how to add the Printer friendly hack in Blogger
So if you are interested in this information, here you can read the post.
Thanks, Ignasi.
You’re welcomed to use the PixelBadge.
Arik
It’s very beautifully.
Great tip! Never knew that could be done. Now I can offer this solution to clients that need to print their WP blogs. Thanks again.
Great walkthrough this and helped me speed up things even if I already knew what I wanted.
Arik - did the permalink on this work for you on all pages? I had problems that the permalink on the printed page would only be correct for pages and posts. Whereas on category, front and other pages listing posts and pages it would give the URL of the last post as a permalink.
Otto gave me the solve for this, thought I’d supply in case others struggle:
http://wordpress.org/support/topic/147484#post-662332
Kjell,
It worked for me. But it depends on the original theme that you’re editing, and where you put the permalink. As Otto said the call to the permalink has to be inside the loop.
Anyway glad I could help
Arik
BTW, I’ve just noticed that you’re using modified cutline. You could have tried to use the CSS I made for OpherBrayer.com…
Hi all,
thought I’d mention here - Stephanie Boot has started developing a plugin to help make any theme printerfriendly similar to this.
If you all contribute information on how you made each of your themes printer-friendly she might end up with a very nice plugin.
Check: http://climbtothestars.org/archives/2008/01/07/print-css-plugin-wordpress-needs-css-guru/
Hello
G’night
thats real nice will help for my lyrics blog .. bcoz most of them need a printout
Thanks friend for this