just like that

  • Home
  • Make Money
    • Your Click
    • Others Click
    • Other Programs
  • Technical Support
    • Windows
    • Android
    • Other
      • how to do
  • online Is On
    • Online Media
      • Online Fm Radio
      • Online Tv
      • Online Games
    • Funny Videos
    • Downlaod Mp3 And MP4 Songs
    • Most Important Videos On Youtube
    • How To Make
  • Tourist Place
  • Health
    • Food Medicine
    • Workout
  • Image Collection

Saturday, 19 November 2011

Blogger Hacks: How to Enable Printer Friendly Pages in your Blog

 02:18     No comments   

Based on reader feedback, we have now added a "Print this Document" button (or hyperlink) to all our blog pages that converts the current webpage into a printer friendly format and sends it to your printer for printing. To see an example of how the final print version of the page would look like, either click this link [Print Page] or select File->Print Preview from your browser menu bar. 

You will notice that the print version of the page is stripped of all the bells-n-whistles like the header graphics, sidebar text, footer information,language translation flags, search box and the comments saving your expensive printer ink and pages. Only web images that are part of the blog post are printed in the final document and rest all the fancy items of the page are omitted.

Now if you are looking to add a similar feature in your blog, here's a simple step-by-step tutorial on how to do it. The trick involves some bit of CSS/Javascript and should work across all blogging platforms (Wordpress, Blogger) and personal homepages (like Geocities or Googlepages) where the owner has access to the website layout template.

Step 1: Add the following line to your blog template inside the <head> tag (copy-paste should work)
<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>
Step 2: Identify all the areas (or HTML elements) in your blog template that you want to hide in the printer friendly version, ie the sections that you don't want to appear in the print copy. Enclose them under <span class="noprint">..</span> tags. I will show you an example below:

Lets say our HTML is something like:
<h1>Our story</h1>
<p>this is a para element one</p>
<img src="abc.jpg" />
<p>this is another para</p><br />
Now in the print version, suppose you want to hide the H1 header and the image. So we will just enclose them inside the span tags like below:
<span class="noprint"><h1>Our story</h1></span>
<p>this is a para element one</p>
<span class="noprint"><img src="abc.jpg" /></span>
<p>this is another para</p><br />
This is just an example, you can enlose the entire div elements to hide big blocks of content.

Step 3: We are almost done, your site visitors won't see the extra luggage when they print your blog posts. If you also want to add a "Print this page" button your blog, add the following HTML snippent anywhere on the page.
<a href="javascript:window.print()">Print Page</a> 
Remember that the above creates a printer friendly version only in memory and directly submits it to the printer. The user is not able to see the electronic version of the print version unless he prints it to PDF using Acrobat or other PDF creation tools.

If you want to build a functionality like The New York Times or Wall Street Journal paper where readers have an option to convert any HTML page into a  text only version which can then either be printed or saved an HTML text file for offline reading, stay tuned for the next part of this tutorial. It involves HTML forms and query parameters.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 comments:

Post a Comment

Video Game Godfather - Work From Home Selling Video Games Online

Click Here!

Appszero - Build Mobile Apps With Zero Coding

Click Here!

Translate

I Got Total Views

Popular Posts

  • 10 Different Url Shorteners That Give You Addon Benefits
    There was a point of time when no one ever considered the fact that there ever might arise a need for a URL shortener. In recent times, howe...
  • Create Short URLs with the Goo.gl Bookmarklet
    If you are looking for a way to create your own short URLs with goo.gl but without installing the Google Toolbar, here's a quick bookma...
  • How to Get Full Feeds inside Google Reader
    Some websites, BBC News for example, offer only a headline and a short excerpt in their RSS feeds and you therefore have to leave your Goo...
  • Top 10 Free Software Download Sites
    A computer user needs different software to meet different needs all the time. Over the years many software companies have created some a...
  • Graphics in Photoshop: 6 Beginner Tips for Web Designers
    Graphic design  and  web design  are two distinct visual fields that have different requirements, best practices and methodologies. For exa...
  • 4G Technology
    What is 4G technology When talking about  4G,  question comes to our mind is  what is 4G Technology .  4G  is short for Fourth (4th) Generat...
  • Tips and tricks for Sony Ericsson W800i and W810i
    Official Sony Ericsson Tips and Tricks http://www.sonyericsson.com/spg.jsp?cc=gb&lc=en&ver=4000&template=ps1_1_5_4&zone=ps...
  • How to Recover your Facebook Account with Trusted Friends
    There are a couple of simple but important steps you may take to ensure that your Facebook account is always safe and secure from hackers. F...
  • The 110 Most Useful Websites
    Following is the list of websites 1.  screenr.com  – The movies are recorded from the desktop. These are sent to YouTube directly. 2.  goo....
  • What is Android
    Android There are different mobiles and computers operating systems like different models of computers and mobiles.  Android  is one of the ...

Recent Posts

Categories

  • 12b
  • 180
  • 365 Kadhal Kadithangal
  • 3g
  • 4 Students
  • 7am arivu video songs
  • affiliate
  • Airtel Free Live Tv
  • Audio CD/DVD Burning
  • blog tricks
  • blogging
  • browser
  • Dish tv
  • download manger
  • download soft
  • earn sites
  • facebook
  • Favicon to Blogger
  • free call
  • free sms
  • games
  • Gemini Comedy
  • google
  • gprs
  • health
  • hindi
  • How do I create a blog
  • internet
  • iPhone
  • java
  • Kavithai
  • LG
  • live mobile tv
  • live tv
  • mobile
  • mobile tv
  • motorola
  • movies
  • mp3 player
  • Nadanthathu Enna
  • Noika
  • old movies
  • online fm
  • online movie
  • online movies
  • online tv
  • Photoshop
  • samsung
  • Serials
  • software
  • sony ericsson
  • sql
  • Surya Hits
  • tamil
  • tamil movies
  • tamil video songs
  • tamilmobiletv
  • tech
  • telugu
  • top 10
  • TV SHOWS‎
  • video converter
  • Video Players
  • video songs
  • windows software
  • youtube

Blog Archive

  • August (36)
  • September (39)
  • November (715)
  • December (627)

About Me

My photo
punniyaseelan
View my complete profile
Powered by Blogger.

Sample Text

Copyright © just like that | Powered by Blogger
Design by punniya seelan | Blogger Theme by New Blogger Themes | Distributed By Templates