Home > Software Development > Turning web docs into printable docs

Turning web docs into printable docs

August 3rd, 2005

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.

Software Development

  1. August 3rd, 2005 at 14:11 | #1

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

  2. August 3rd, 2005 at 14:34 | #2

    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.

  3. August 4th, 2005 at 05:51 | #3

    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.

  1. No trackbacks yet.