From owner-freebsd-questions@FreeBSD.ORG Tue Jun 6 19:25:23 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E4CD16BC73 for ; Tue, 6 Jun 2006 19:18:58 +0000 (UTC) (envelope-from coolzone@io.dk) Received: from dansknet.dk (smtp1.dansknet.dk [85.233.229.242]) by mx1.FreeBSD.org (Postfix) with SMTP id E923643D53 for ; Tue, 6 Jun 2006 19:18:55 +0000 (GMT) (envelope-from coolzone@io.dk) Received: (qmail 18086 invoked from network); 6 Jun 2006 20:05:00 -0000 Received: from 85233229154.switch.dansknet.dk (HELO ?85.233.229.154?) (85.233.229.154) by dansknet.dk with SMTP; 6 Jun 2006 20:05:00 -0000 Message-ID: <4485D57A.2070802@io.dk> Date: Tue, 06 Jun 2006 21:20:26 +0200 From: Rico User-Agent: Thunderbird 1.5.0.2 (X11/20060601) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4484DD5E.3020302@io.dk> <20060606140733.GL22904@ayvali.org> In-Reply-To: <20060606140733.GL22904@ayvali.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Converting DocBook into PDF X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2006 19:25:24 -0000 N.J. Thomas wrote: > * Rico [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.