Next / Previous / Contents / Shipman's homepage

5.1. Tool chain selection

Python is a good open-source language perfectly suited to all the tasks here.

There are many routes to PDF, but the author has some experience with the XSL-FO standard, the eXtensible Stylesheet Language Formatting Objects. The author recommends this book on the subject:

Pawson, Dave. XSL-FO: Making XML Look Good in Print. O'Reilly, 2002, ISBN 0-596-00355-2.

Because an XSL-FO is an XML document, we will use the etbuilder.py module described in Python XML processing with lxml, which is well-suited for building an XML document from scratch. The lxml module is also suitable for parsing the input DocBook document.

We also use fohelpers.py: XSL-FO helper functions for Python, a module to assist in building XSL-FO files. This module is built on top of lxml and supplies the overall structure. Our application then uses etbuilder to add the content.