List Info

Thread: FOP 0.93 throws exception when it encounters a graphic




FOP 0.93 throws exception when it encounters a graphic
user name
2007-04-05 18:39:24

I realize this is more of an FOP question, but I thought I’d try the DocBook list to see if anyoneR17;s stumbled on the same problem. I’m trying to update my DocBook system to FOP 0.93 and DocBook XSl 1.72. Whenever I try to process a document that has a graphic I now get the following exception:

 

SEVERE: Exception

javax.xml.transform.TransformerException: java.lang.IllegalArgumentException

        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)

        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)

        at org.apache.fop.cli.Main.startFOP(Main.java:160)

        at org.apache.fop.cli.Main.main(Main.java:191)

 

Here are tags I’m using for the graphic:

 

 &nbsp; &nbsp;  <para>;Here’;s a graphic:&lt;/para>

 &nbsp; &nbsp;  <para&gt;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; <graphic fileref=&#8221;Graphics/FirstScreen.gifR21; width=”4.747in” contentwidth=”4.747in̶1; align=&#8221;center”/&gt;

 &nbsp; &nbsp;  </para&gt;

 

Here’;s an excerpt from the FO file:

 

<fo:block space-before.optimum="0.4em" space-before.minimum="0.4em" space-before.maximum=&quot;0.55em&quot; space-after.optimum=&quot;0em&quot; space-after.minimum="0em" space-after.maximum=&quot;0em">Here's a graphic:</fo:block><fo:block space-before.optimum="0.4em" space-before.minimum=&quot;0.4em&quot; space-before.maximum="0.55em" space-after.optimum=&quot;0em" space-after.minimum=&quot;0em&quot; space-after.maximum="0em">

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; <fo:block text-align="center">;<fo:external-graphic src=&quot;url(Graphics/FirstScreen.gif)&quot; width=&quot;4.747in&quot; height=&quot;auto&quot; content-width=&quot;4.747in&quot; content-height="auto" text-align="center"/&gt;</fo:block>

 

Instead of gifs, I’ve tried using PNG files, but it makes no difference.

 

This worked fine with FOP 0.20.5 and DocBook XSl 1.69.

 

Regards,

Jeff Powanda

 

Re: FOP 0.93 throws exception when it encounters a graphic
user name
2007-04-05 19:27:09
   I've got a Windows Docbook5 setup with xsltproc, XSL1.7.2
and fop
0.9.3 and things work okay for me -- at least with JPEGs,
PNGs and
GIFs.  That's with both:

<graphic fileref="Graphics/niagara.jpg"
width="4.747in"
contentwidth="4.747in" align="center"
/>

and

 <mediaobject>
        <imageobject>
          <imagedata align="center"
depth="3in"
                    
fileref="Graphics/niagara.jpg"
                     scalefit="1"
valign="middle"
width="6in"></imagedata>
        </imageobject>
      </mediaobject>



   The FO that gets generated is:


          <fo:block
text-align="center"><fo:external-graphic
src="url(Graphics/niagara.jpg)"
width="4.747in" height="auto"
content-width="4.747in"
content-height="auto"
text-align="center"/></fo:block>

</fo:block>

   There doesn't appear to be a difference.  Is it possible
that
something in your setup has been corrupted?  The only other
thing I
can think of is perhaps a platform-specific difference. 
Hope that
helps!


kells


On 4/5/07, Jeff Powanda <jpowandavocera.com> wrote:
>
>
>
>
> I realize this is more of an FOP question, but I
thought I'd try the DocBook
> list to see if anyone's stumbled on the same problem.
I'm trying to update
> my DocBook system to FOP 0.93 and DocBook XSl 1.72.
Whenever I try to
> process a document that has a graphic I now get the
following exception:
>
>
>
> SEVERE: Exception
>
> javax.xml.transform.TransformerException:
> java.lang.IllegalArgumentException
>
>         at
>
org.apache.fop.cli.InputHandler.transformTo(InputHandler.jav
a:168)
>
>         at
>
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:1
15)
>
>         at
org.apache.fop.cli.Main.startFOP(Main.java:160)
>
>         at org.apache.fop.cli.Main.main(Main.java:191)
>
>
>
> Here are tags I'm using for the graphic:
>
>
>
>       <para>Here's a graphic:</para>
>
>       <para>
>
>             <graphic
fileref="Graphics/FirstScreen.gif"
> width="4.747in"
contentwidth="4.747in"
align="center"/>
>
>       </para>
>
>
>
> Here's an excerpt from the FO file:
>
>
>
> <fo:block space-before.optimum="0.4em"
space-before.minimum="0.4em"
> space-before.maximum="0.55em"
space-after.optimum="0em"
> space-after.minimum="0em"
space-after.maximum="0em">Here's a
> graphic:</fo:block><fo:block
space-before.optimum="0.4em"
> space-before.minimum="0.4em"
space-before.maximum="0.55em"
> space-after.optimum="0em"
space-after.minimum="0em"
> space-after.maximum="0em">
>
>                   <fo:block
>
text-align="center"><fo:external-graphic
> src="url(Graphics/FirstScreen.gif)"
width="4.747in"
> height="auto"
content-width="4.747in"
content-height="auto"
> text-align="center"/></fo:block>
>
>
>
> Instead of gifs, I've tried using PNG files, but it
makes no difference.
>
>
>
> This worked fine with FOP 0.20.5 and DocBook XSl 1.69.
>
>
>
> Regards,
>
> Jeff Powanda
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )