Printing webpages has long intrigued me and the results have always been suboptimal, especially with something as complex as Wikipedia articles. However, the web is moving forward and the printing options for the web are getting better with every browser release. The past few days I was revisiting this issue and I have now added some new CSS to the print stylesheet of MediaWiki which should help browsers detect proper spots to insert pagebreaks and more importantly, where to avoid them.
|Before pagebreak CSS||After pagebreak CSS|
Another thing that I have been working on is a new gadget called Print dialog. It helps you influence how pages are printed, right from Wikipedia. You can remove backgrounds, images and references, and mark all the text as black. Really very useful for if you intend to do some quick printing and since there is demand (Bugzilla 25869, bugzilla 22256), we might actually see this one day in the MediaWiki software.
The most esoteric function of Print dialog, is an option to actually kill the print styling. Normally when you print Wikipedia pages, you will use a different set of stylesheets that are optimized for printing instead of the screen. These stylesheets hide the interface components and elements that might not be useful in print. Usually this is wonderful, but sometimes I just want it all, and on my browser (Safari), this was not possible (well you could make a screenshot). With this new option you can actually fake the screen media while you print. Currently it works only for Safari. IE is untested, and Firefox/Opera refuse me to give the access I need to adapt the stylesheets, due to the Same Origin policy, which is violated due to the usage by the Foundation of a separate server for the stylesheets (Bugzilla 25886).
|Example print output with no images||Print output without references and backgrounds||Print output with all non-print elements restored|