Grab yourself a beverage, hit print and read about the simple things that make a big difference when visitors print. But its not all about paper, inspired by Safari Reader we take a look at a modern day take on the once dreaded print preview.
Isn’t it funny, no matter how much effort you put into designing a new site for a client, one of their first instincts is to print it off!
Then come the visitors who rather than spending time admiring the hours you have lovingly poured into creating a design go and print off content to enjoy elsewhere.
You’re right, that’s such a dramatization, not everybody comes to your site and hits the print button but when they do have you them covered?
Why Do Visitors Print?Before we continue, lets take a look at why someone may print your site in today’s world. Lets take myself as an example. I am a consultant for Australia’s largest open source ECMS vendor. I read, research, experiment with and talk about the web all day every day. Most of that, in front of a screen or on one of the several tech gadgets I own. So why do I print?
- I can scribble on paper to my heart’s content.
- I can escape from my desk onto a sunny balcony with fresh air and a good read in hand.
- I am able to spot content issues more easily on paper than on a screen (I review a lot of content)
- Call me wasteful but after spending all day on a computer the feel of paper and the smell of freshly printed ink is irresistible.
- I often hand colleagues and clients reports, articles and so on.
- I print heaps of articles to read on the tram/train ride to and from work.
Read on to walk through the creation of a quick print stylesheet that will make visitors happier when they walk over to the printer.
For something different, we will also take a look at a modern day print preview with inspiration from Safari Reader.
Creating a Print Stylesheet in a Flash
Start With a Clean SlateI find that the best approach to creating a print stylesheet is starting with a clean slate by dividing all screen styles from print styles like so:
Note: If you do decide to inherit screen styles into your print stylesheet by using media=“all” on the above screen stylesheet link element, be sure to override any background image replacement and nullify any absolute positioning. The reason for this is that many browsers disable all background properties (images and colors) and run into problems with positioning of elements.
Remove Clutter and Save the EnvironmentWhen visitors print off a web page they do so for the content. Do them and the environment a favor and remove any elements that won’t be read: navigation, photo gallery, carousel controls, social media links, search forms, widgets and so on all turn into clutter on a piece of paper.
Think of everything that is irrelevant once on paper and remove it with a single swipe:
Make Reading a PleasureIt’s often cited that while Sans Serif type is great for reading on screen and the better option for print is a Serif type.
It doesn’t have to be Times New Roman and yet more Times New Roman, here’s an example that uses simple spacing, Georgia and some CSS3 flair to spice up the page:
BrandingIf you would like to add a little touch of branding to your site when its printed why not bring in a print friendly version of your logo.
The key here is remembering that all today’s browsers will strip background images meaning that no image replacement can be used.
ABC News (Australian Broadcasting Authority News) has a great example of this where they have included a print version of their logo that is waiting to be picked up when somebody prints:
A print friendly version of the ABC logo waiting for the right moment:
An excerpt of ABC screen stylesheet hiding the print friendly logo:
Alternatively, you can always keep things simple and make your header a little bigger and bolder like so:
You Can’t Click on a Piece of PaperAt some point, you have probably found yourself reading a printed article when you get to an engrossing section that includes a link for more information. A link that sits there teasing you with its blue underline. Without a mouse or Apple’s latest interfacing doo-hicky you have no chance of finding out where that link goes unless you return to the original article on screen.
The solution to unclickable links is an easy one to deploy. Use some CSS to print out the location of the link that would otherwise be hidden:
Notice that the above CSS limits itself to all links in the content. So things like a link around logos don’t show up.
Bring Those Visitors Back to Your SiteWhen you’re targeting visitors on screen, encouraging them to click through other pages or subscribing through RSS, email or newsletter is quite simple. But what about those who print?
With a little additional CSS its easy to add a helpful message that also acts as an opportunity to help bring them back to a site.
Note: The above CSS also adds a note to remind visitors and clients that you have removed unnecessary clutter such as navigation, helping reduce confusion in the transition from screen to paper.
Part of the benefit of dividing styles between screen and print mentioned earlier in this article is that conquering thEse elements comes down to identifying what inline CSS is being added by JS controlling interactive/animated elements.
Lets take a photo gallery as an example. Head on over to the jQuery Tools site for a demo of their scrollable image gallery in action. If you open up Firebug or your favorite equivalent and target the containing element of the photos you will see that the jQuery Tools Scrollable plugin is adding an inline ‘left’ declaration that pulls and pushes the gallery left and right.
Print Preview With StyleEver since I first saw Safari’s Reader, I have wondered how it would be like for a visitor to click on a print link and see an A4 piece of paper sliding up the screen including a preview of what they are about to print. Then I started to think about the merits of a jQuery plugin that is simple to roll out on any site that had a print stylesheet. Something that showed visitors what they were going to print before they printed without needing a ‘print version’ of the site.
So that’s exactly what I wrote. Introducing a jQuery plugin called Print Preview that does exactly what it says on the can with a demo to boot.
Click on the print preview button on the top right, or for an added bonus simply hit the ‘P’ key on your keyboard.
Get Set-up in Three Steps:
- Setting up a print stylesheet
- Including the jQuery plugin and a little CSS (packaged) to style the sliding lightbox/modal window.
- Adding a print preview link and initializing the plugin
What are you waiting for?And that is all you need to produce a robust print stylesheet that will bring readability and focus to content for anyone who prints off a page.
If you are they type of going the extra mile, here there are some further ideas:
- Style additional elements such as tables. For some ideas read Jonathan Snook’s article titled Terrific Tales with CSS over on Sitepoint.
- If applying a print stylesheet to a site with comments why not look into “page-break-before: always;” to push all comments to new page — offering the option for visitors to drop off the last pages when printing
- Accommodate for JS by overriding any JS driven styles like opacity. See the above demo for some ideas.
What else have you done with print stylesheets?
What crazy things have you seen people print from the web?
Do you think the art of scribbling on paper will be a lost art in the years to come?
When Visitors Print — About That Print Stylesheet Reviewed by Aamir Pathan on 1:27 PM Rating: