From: Devin Mullins Date: 2005-11-13T04:32:11+09:00 Subject: Re: DocBook to PDF Devin Mullins wrote: > 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. To drill it in: DocBook --(XSLT)--> XSL-FO --(FOP)--> PDF The XSLT pictured is a specific XSLT stylesheet for converting DocBook to XSL-FO. XSLT is a general XML language specification for XML file conversion, as specified before, and according to Keith, there exists a specific XSLT "script" for DocBook --> XSL-FO. You will need an XSLT "interpreter" to run it. Xalan is one. (Google it.) FOP is FOP. It needs no specific thing. XSL-FO and PDF are both fairly standard. Devin