[TriLUG] Docbook, PDF and Ubuntu (5.10)

Owen Berry oberry at trilug.org
Mon Jan 9 12:38:35 EST 2006


I've been working off FC2/3, but have had better luck with FOP
(http://xml.apache.org/fop/) for generating PDF's. Here's part of a
README I created for a project I worked on where we created
documentation using docbook. BTW, I found installing the latest and
greatest versions of these tools, rather than using the "built-ins" from
your distro, to be key in getting things to work:

  Short installation instructions for FOP:
  ------------------------------------------

  1) Dowload FOP from the project web site.
  2) Extract the archive to a suitable location on your hard drive.
  3) There is a script called fop.sh in the root of the archive. Either put the
      directory in your path or create a symbolic link to the script in a
      directory that is in your path. That is, get fop.sh in your path!
  4) Download the Java Advanced Imaging (JAI) API from:
        http://java.sun.com/products/java-media/jai/current.html
      You don't need the Image IO tools download, just the JAI API. You can
      either get an installation that installs into your JRE, or one that
      installs into an arbitrary location.
  5) Execute the binary provided and install the JAI. Locate the jai_core.jar
      and jai_codec.jar files within the installation. Copy them to the lib
      directory in your fop installation.
  6) Look in the docbook-xsl/extensions directory and find the xalan extension
      jar file. Copy it to the fop lib directory too.
  7) You're all set. Now you just need to set the JAVA_HOME environment variable.

  Additional useful installation instructions can be found at:

   http://www.sagehill.net/docbookxsl/InstallingAnFO.html

  Get the docbook stylesheets
  ------------------------------

  1) Go to http://docbook.sourceforge.net/ and download the XSL (not DSSSL) style
    sheets distribution (example docbook-xsl-1.67.0.tar.gz). The version in use
    in this project is 1.67.

  2) Extract the archive to this directory. Your directory structure should now
    look this:

.....

The command I eventually used to create the document was:

    fop.sh -xsl fopstyle.xsl -xml UserGuide.xml -pdf UserGuide.pdf

Let me know if you have further questions.

Owen

On Mon, Jan 09, 2006 at 12:22:45PM -0500, Chris Knowles wrote:
> This is probably a totally silly question, but I'm having trouble
> finding answers on the net, and thought I'd poke the massive brains
> here.
> 
> I've got a XML Docbook manual that I've been working on, and in the
> past, HTML has been all I want it in... however, management now wants it
> as a PDF.  
> 
> In the past I've issued the command "xmlto -o output html manual.xml"
> and the directory output has the html files that I want. 
> 
> So, I issued the command "xmlto pdf manual.xml" and instead of a happy
> pdf, I get TeX error messages about there being a missing \item
> somewhere.  Now, I'm NOT a TeX person, so that's greek to me.  I've got
> all suggested and recommended dependencies for xmlto installed, so I
> think things should be working...
> 
> So, Anyone have an Ubuntu 5.10 installation that is producing pdf output
> from XML docbook?  Or is there a better way to do things?
> 
> Thanks.
> 
> CJK



More information about the TriLUG mailing list