Date: Tue, 6 Jun 2006 10:07:33 -0400 From: "N.J. Thomas" <njt@ayvali.org> To: Rico <coolzone@io.dk> Cc: freebsd-questions@freebsd.org Subject: Re: Converting DocBook into PDF Message-ID: <20060606140733.GL22904@ayvali.org> In-Reply-To: <4484DD5E.3020302@io.dk> References: <4484DD5E.3020302@io.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
* Rico <coolzone@io.dk> [2006-06-06 03:41:50 +0200]: > I am working on a documentation project and needs to convert some > DocBook files into several formats. > > I have installed "xmlto" amongst others and I can convert the DocBook > into XHTML, TXT but not into PDF or PS. This doesn't really help you with your xmlto problem, but I use the following toolchain to produce PDF from DocBook - write the XML file against the DocBook DTD - validate the file with "xmllint --valid --noout foo.xml" xmllint is part of libxml2 (Theoretically, this step is not necessary if you write proper XML, but xsltproc does not checks for valid XML (only well formed), and if you pass it non-valid DocBook XML, it spits out all sort of cryptic errors.) - use xsltproc to convert to HTML: xsltproc --output foo.xhtml /usr/local/share/xsl/docbook/xhtml/docbook.xsl foo.xml (xsltproc is part of libxslt) - use xsltproc to convert to FO: xsltproc --stringparam fop.extensions 1 --output foo.fo /usr/local/share/xsl/docbook/fo/docbook.xsl foo.xml - use fop to convert FO to DPF: fop foo.fo foo.pdf You can find libxml2, libxslt, fop, docbook-xml, and docbook-xsl in ports. Thomas -- N.J. Thomas njt@ayvali.org Etiamsi occiderit me, in ipso sperabo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060606140733.GL22904>