From: Devin Mullins Date: 2005-11-13T04:12:11+09:00 Subject: Re: DocBook to PDF Hal Fulton wrote: > Keith Fahlgren wrote: > >> On Sat, 12 Nov 2005, Hal Fulton wrote: >> >> >> Does this need to be a pure Ruby solution? If not, I'd suggest using >> (or adapting) the standard DocBook stylesheets >> (http://wiki.docbook.org/topic/DocBookXslStylesheets), and using >> (perhaps via the Ruby libxslt bindings) those to generate XSL-FO, >> which you can >> then feed into FOP (http://xmlgraphics.apache.org/fop/) or the FO >> formatter >> of your choice. > > > That sounds tedious and error-prone to me -- I don't normally use any > of this stuff. And I don't even know what FO is. XSL-FO is a W3C standard, a product of the XSL working group (the same people who put out XSLT, the language for converting XML documents). XSL-FO is an intermediary XML language for represented "formatted objects" (rich text documents). Many tools exist to convert XSL-FO files (documents) into PDF, PNG, etc. Apache FOP is the popular Java one, but you don't need to know Java to use it. It has a command line interface whereby you feed it the filename of an XSL-FO file and the filename of your desired PDF file. Capisce? Devin (Tedious? Error-prone? It's a W3C XML standard, so, probably. But, luckily, you don't have to write any of that crap -- just use it.)