Robert P. J. Day wrote:

>   in my simple docbook document, i've added a couple figures,
> one with a JPG file (renders nicely), one with a PNG file (does
> not render at all).  both show up in the .fo file as a
> fo:external-graphic, so i know *that* part of it is correct.
>
>   from what i read in the FOP FAQ, PNG support is provided by
> either JIMI or JAI.  in fact, i have both installed and their
> jar files on my java CLASSPATH.
>
>   the FAQ graphics entry for JIMI is a bit confusing, since
> it suggests that i should install the JimiProClasses.zip file
> (actually, i'm using the jar file) in the directory
> xml-fop/lib/jimi-1.0.jar.  why is it not sufficient to put
> the Jimi jar file on my CLASSPATH?

If you are using a home-grown script that is fine. However, I suspect that
you are actually using fop.bat or fop.sh at some point. If so, then a
cursory examination of those scripts will show that FOP doesn't use your
classpath at all, but builds its own. This is important for some of the
dependencies (like Batik) that require a very specific version number to
work correctly with FOP. So, you can hack fop.sh if you wish, but if you do,
then make sure you hack build.xml as well, because otherwise if you try to
build FOP from source down the road, you will do so without JIMI or JAI
support. IMO, it is really much better to simply follow the instructions.

>   and what's with the xml-fop directory?  where is *that*
> supposed to be?

I'll take the blame for that one. That should read {fop-install-dir}
instead. The xml-fop directory is the location in CVS, but it could be
installed anywhere on your system. I have fixed the doc for this in CVS (it
will be a few days before it shows up on the live site).

> again, both the jimi and jai jar files are
> on my classpath.  shouldn't that be sufficient?

Same story on JAI. Here is the revised (source) documentation for JIMI &
JAI:

      <section id="jimi">
        <title>JIMI</title>
        <p>
          Because of licensing issues, the JIMI image library is not
included in the FOP distribution. First, <fork
href="http://java.sun.com/products/jimi";>download</fork> and install it.
Then, copy the file "JimiProClasses.zip" from the archive to
{fop-install-dir}/lib/jimi-1.0.jar. Please note that FOP binary
distributions are compiled with JIMI support, so there is no need for you to
build FOP to add the support. If jimi-1.0.jar is installed in the right
place, it will automatically be used by FOP, otherwise it will not.
        </p>
      </section>
      <section id="jai">
        <title>JAI</title>
        <p>
          FOP has been compiled with JAI support, but JAI is not included in
the FOP distribution.
To use it, install <link
href="http://java.sun.com/products/java-media/jai";>JAI</link>, then copy the
jai_core.jar file to {fop-install-dir}/lib.
JAI is much faster than JIMI, but is not available for all platforms. See
<link
href="http://java.sun.com/products/java-media/jai/forDevelopers/jaifaq.html#
platforms">What platforms are supported?</link> on the JAI FAQ page for more
details.
        </p>
      </section>

>   in addition, my FOP output contains:
>
> ... snip ...
> [INFO] [10]
> [INFO] Failed to load JAI, using Jimi instead
> [ERROR] Error while creating area : Error creating FopImage
> object (Error creating FopImage object
> (file:stylesheet-images/tip.png) : org.apache.fop.image.JimiImage
> [ERROR] Error while creating area : Error creating FopImage
> object (Error creating FopImage object
> (file:stylesheet-images/note.png) : org.apache.fop.image.JimiImage
> [ERROR] Error while creating area : Error creating FopImage
> object (Error creating FopImage object
> (file:stylesheet-images/important.png) : org.apache.fop.image.JimiImage
> [ERROR] Error while creating area : Error creating FopImage
> object (Error creating FopImage object
> (file:stylesheet-images/caution.png) : org.apache.fop.image.JimiImage
> [ERROR] Error while creating area : Error creating FopImage
> object (Error creating FopImage object
> (file:stylesheet-images/warning.png) : org.apache.fop.image.JimiImage
>
> ... more snip ...
>
> [ERROR] Error while creating area : Error creating FopImage
> object (Error creating FopImage object (file:cover.png) :
> org.apache.fop.image.JimiImage
> [WARNING] Some static content could not fit in the area.
> [WARNING] Some static content could not fit in the area.
> [INFO] Parsing of document complete, stopping renderer
> rm -rf ./stylesheet-images
> cp -a `xmlcatalog /etc/xml/catalog
> http://docbook.sourceforge.net/release/xsl/current | sed -e
> 's,^file://,,'`/images ./stylesheet-images

Let's see how much of this is cleaned up when you let FOP find the classes
it needs.

Victor Mote


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to