In other words, I would like to lay out my printable documents in a way that’s familiar to me, for which I have tools that can support this and that can easily be changed without having to do a search and replace through a hundred distance instances of a paragraph. In short, I want CSS, acting on XHTML, generating my printed pages as readily as it displays that content to the screen.
A previous blog from Michael Day about PrinceXML reminded me that I hadn’t had a chance to play with it. My previous experiences with XHTML to PDF conversion were, to put it bluntly, terrifying, and so, as I was downloading the JAR file I wasn’t expecting a lot. When I tried it, I wasn’t disappointed … I was stunned. I had taken an article that I’d recently written for XML.com and run it through Prince. It digested the ten page article and cranked out a PDF in under a second, and the quality was better than anything I’d been able to get with a straight DocBook/FO/PDF rendering.
I looked up the documentation, and found that it supported the CSS 3.0 page rendering set, as well as support for columns (including columnar rules), it could be used to print SVG content embedded or linked to the main XHTML document, and it included a nice set of extension properties for handling headers and footers, internal links, rounded borders, and the full panoply of CSS selectors including nth-child (which seemingly no one supports), content search and the whole gamut of pseudo-classes.