Date: Tue, 06 Jun 2006 21:20:26 +0200 From: Rico <coolzone@io.dk> To: freebsd-questions@freebsd.org Subject: Re: Converting DocBook into PDF Message-ID: <4485D57A.2070802@io.dk> In-Reply-To: <20060606140733.GL22904@ayvali.org> References: <4484DD5E.3020302@io.dk> <20060606140733.GL22904@ayvali.org>
next in thread | previous in thread | raw e-mail | index | archive | help
N.J. Thomas wrote: > * 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 > Thank you very much! I will use that solution then! Rico.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4485D57A.2070802>