Turning web docs into printable docs

Quite a bit of documentation is written in HTML these days, since quite a bit of it is designed to be on the web. HTML doesn’t always work out well for the printed page, primarily because you need to be able to properly refer to page numbers in a large document. You need that capability for tables of contents, indices and references to illustrations. Print is also better if you have at least a little control over where a pagebreak occurs.

All hope is not lost, however. There is a page on the fabulous css-discuss wiki that talks about print stylesheets, and goes through the capabilities and pitfalls. It sounds like Opera currently has the best browser support for print style sheets.

Two other solutions worthy of consideration, though, are: CSStoXSLFO and Prince.

CSStoXSLFO converts an XML document with a stylesheet into a PDF by way of XSL formatting objects. It supports some of the CSS page tags and provides a means to do references to page numbers. And it’s free!

Prince is not free ($349 for a single user license), but sounds very capable and has a free trial so that you can really give it a whirl.

Both of these products include specific support for turning XHTML into quality PDFs.


3 Responses to “Turning web docs into printable docs”

Ian Bicking on August 3rd, 2005 2:11 pm:

I saw something recently about work on a headless version of Mozilla meant to produce documents for printing.


tazzzzz on August 3rd, 2005 2:34 pm:

That would probably be this:
http://www.mozillazine.org/talkback.html?article=6927

Unfortunately, I haven’t seen anything about Gecko providing particularly good support for page breaks, page numbers and other nice printing features.


Kosi2801 on August 4th, 2005 5:51 am:

http://gecko.dynalivery.com
has also a solution which executes Gecko inside some sort of framework to produce PDF, JPEG, AFP and even SVG.
It’s commercial though but has an online demo there.