Printing pleasure.

While I was on vacation in France this summer I printed Wikipedia content for the first time. And boy was I pleasantly surprised. The print had a different layout than the website. It was perfectly suited to reading on a piece of paper, had the aduquate kind of information and ditched web-specific layout aspects. Very nice and all that without having to click on some kind of go here to see the printer friendly version link.

Of course, I wanted to implement this for my website too. Behind the scenes, this is based on good CSS code, which offers hooks to change layout and other features of your content according to the media that is used to access the content on your page (i.e. screens, printed paper, sound, braille thingies for blind people, mobile phones etc.). I knew about this almost since my first dabblings in CSS, but I never collected enough guts to actually write the code for my site.
This changed today – because I was procrastrinating, trying to evade working on a paper that I have to finish very soon, and because of mentioning this feature of CSS to Tini a few days ago, I wanted to see how hard it is to implement. Thanks to SELFHTML and a bit of browsing I was able to hack the changes that are necessary to have a separate print version of my diploma thesis in about four hours – even though the thesis consists of about fourteen separate pages, includes lots of different links, pictures, edits and so forth. Quite a bit less time than I would have feared, I have to admit. I will let this settle for a bit and then implement the same changes for my other pages, which should not take more than an hour – the blog is still waiting for a general code overhaul anyway, during which I will include a print style sheet.
One thing did not work as intended though: the @page part of the CSS 2 specification is not fully implemented by the different modern browsers (we’re not talking Internet Explorer here anyway), therefore the page margins will be different and not always perfect when printing with different browsers. However, I don’t care about this much at this point of time – hopefully these printing features will be implemented sooner rather than later. Here, you can help: vote for the relevant Mozilla bugs 115199 and 286443 in bugzilla!

Tags: ,

2 Responses to “Printing pleasure.”

  1. ozean says:

    thanks! always moving the mission forward :)>

Leave a Reply