Ads 468x60px

Pages

Sunday, June 24, 2007

Adding a "Print this" option for your blog.

Here is a hack to enable your blog visitors to be able to print your blog, HP has provided a hack. This is what you need to do. As usual, BACKUP your template before you make any changes to the template. See Backing up and changing New Blogger template.

In your template, paste this script just below the <head> tag: (actually, it can be anywhere between the <head> and </head> tags, but pasting it immediately after the <head> tag is the easiest and the easiest to explain):

<style type="text/css" media="print">
#noprint {display: none;}
// Hide unwanted elements
body {background:fff; color:000;}
// Black text on White background
a {text-decoration: underline; color:00f;}
//Underline Hyperlinks in blue
}
</style>

Preview, and if everything seems OK, click "Save Template"

Then in one of your post (or all your posts if you want) put this at the bottom of the post in the post editor window:

<a href="javascript:window.print()">Print Page</a>

If you want the "Print Page" to appear in all your post, go to SETTINGS > FORMATTING and paste the above into the post template window.

To see an example, go to My Photo Store. I have only put "Print Page" in the first post (sticky post) "Picassa - Google Photo software". Don't try clicking on this button if you have your printer connected and switched on. You are going to waste a lot of paper. Install CutePDF writer (search for that in the search box above for the site to install this). You will have to install 2 things, the free CutePDF writer and the free GPL Ghostscript 8.15 converter. An extra option will be added to your choice of printers. If you have that installed, click "Print Page" and select "CutePDF Writer" as the printer and the page will be printed to a PDF file, saving you lots of paper and ink/toner.

0 comments:

Post a Comment