This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Transforming DocBook to PDF with FOP
- To: docbook <docbook-apps at lists dot oasis-open dot org>
- Subject: Re: DOCBOOK-APPS: Transforming DocBook to PDF with FOP
- From: Michael Westbay <westbay at users dot sourceforge dot net>
- Date: Thu, 12 Jul 2001 09:02:30 +0900
- References: <5.1.0.14.0.20010603103046.03d18ae8@pop2.magic.fr><3B4CDEDA.8559CBDF@milagrosoft.com>
To Demians-san's problem about getting the infamous "no protocol" error when
working with images and FOP,
Richardson-san wrote:
> I get this same problem with the 1.39 stylesheets.
> [java] Error while creating area : no protocol:
> url(file:images/classdia1.jpg)
>
> <mediaobject>
> <imageobject>
> <imagedata fileref="images/classdia1.jpg" format="JPG"/>
> </imageobject>
> </mediaobject>
>
> The HTML generation works okay. Is this a FOP bug or something missing
> in my src?
My guess is that it's a FOP problem (not necessarilly a bug). I do
essentially the same thing, but format="GIF" images come out fine,
format="PNG" images don't. I haven't tried a JPG yet.
The followinging works:
<inlinemediaobject>
<imageobject>
<imagedata format="GIF" fileref="images/logo.gif"/>
</imageobject>
<textobject>MyCompany</textobject>
</inlinemediaobject>
I have several <mediaobject>s with similar <imagedata>, all in GIF format.
For callouts, I also had to add:
<xsl:param name="callout.graphics">1</xsl:param>
<xsl:param name="callout.graphics.extension">.gif</xsl:param>
to my customized .xsl file. The default extension is (as of 1.40) .png.
Hope this helps narrow down the problem, or at least give you a work around.
--
Michael Westbay
Work: Beacon-IT http://www.beacon-it.co.jp/
Home: http://www.seaple.icc.ne.jp/~westbay
Commentary: http://www.japanesebaseball.com/