You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by John Walker <dt...@yahoo.es> on 2003/05/06 10:46:38 UTC

Problem loading images in PDF with FOP

Hi all! I'm trying to transform an XSL-FO file to PDF in a servlet with 
FOP embedded. I'm using FOP 0.20.4, JDK 1.4.0 and Tomcat 4.0.2. 
Everything works, but when there's an image in the XSL-FO like this:

<fo:external-graphic height="2cm" width="4.8cm" 
src="/usr/local/web-datos/tomcat/images/ger.jpg"/>

the next exception occurs:

javax.servlet.ServletException: org/w3c/dom/svg/SVGDocument
    at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
    at 
org.apache.jsp.muestraDocumentos$jsp._jspService(muestraDocumentos$jsp.java:104)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    ....
    ....
java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
    at org.apache.fop.image.analyser.ImageReaderFactory.Make(Unknown Source)
    at org.apache.fop.image.FopImageFactory.Make(Unknown Source)
    at org.apache.fop.fo.flow.ExternalGraphic.layout(Unknown Source)
    ....
    ....

But I'm not using SVG but just a simple JPG image! Any idea? I need some 
help... Thanks!!



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Problem loading images in PDF with FOP

Posted by John Walker <dt...@yahoo.es>.
Thankx Jeremias! I had the additional problem that the classpath that 
tomcat loads it's not the system classpath but his own defined in a 
configuration file (it had been a tricky search). Finally works...

Jeremias Maerki escribi�:

>It's a known problem. Just make sure you've got batik.jar in the
>classpath even if you don't need it.
>
>On 06.05.2003 10:46:38 John Walker wrote:
>  
>
>>Hi all! I'm trying to transform an XSL-FO file to PDF in a servlet with 
>>FOP embedded. I'm using FOP 0.20.4, JDK 1.4.0 and Tomcat 4.0.2. 
>>Everything works, but when there's an image in the XSL-FO like this:
>>
>><fo:external-graphic height="2cm" width="4.8cm" 
>>src="/usr/local/web-datos/tomcat/images/ger.jpg"/>
>>
>>the next exception occurs:
>>
>>javax.servlet.ServletException: org/w3c/dom/svg/SVGDocument
>>    at 
>>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
>>    at 
>>org.apache.jsp.muestraDocumentos$jsp._jspService(muestraDocumentos$jsp.java:104)
>>    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>>    ....
>>    ....
>>java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
>>    at org.apache.fop.image.analyser.ImageReaderFactory.Make(Unknown Source)
>>    at org.apache.fop.image.FopImageFactory.Make(Unknown Source)
>>    at org.apache.fop.fo.flow.ExternalGraphic.layout(Unknown Source)
>>    ....
>>    ....
>>
>>But I'm not using SVG but just a simple JPG image! Any idea? I need some 
>>help... Thanks!!
>>    
>>
>
>
>Jeremias Maerki
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-user-help@xml.apache.org
>
>  
>


Re: Problem loading images in PDF with FOP

Posted by Jeremias Maerki <de...@greenmail.ch>.
It's a known problem. Just make sure you've got batik.jar in the
classpath even if you don't need it.

On 06.05.2003 10:46:38 John Walker wrote:
> Hi all! I'm trying to transform an XSL-FO file to PDF in a servlet with 
> FOP embedded. I'm using FOP 0.20.4, JDK 1.4.0 and Tomcat 4.0.2. 
> Everything works, but when there's an image in the XSL-FO like this:
> 
> <fo:external-graphic height="2cm" width="4.8cm" 
> src="/usr/local/web-datos/tomcat/images/ger.jpg"/>
> 
> the next exception occurs:
> 
> javax.servlet.ServletException: org/w3c/dom/svg/SVGDocument
>     at 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
>     at 
> org.apache.jsp.muestraDocumentos$jsp._jspService(muestraDocumentos$jsp.java:104)
>     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>     ....
>     ....
> java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
>     at org.apache.fop.image.analyser.ImageReaderFactory.Make(Unknown Source)
>     at org.apache.fop.image.FopImageFactory.Make(Unknown Source)
>     at org.apache.fop.fo.flow.ExternalGraphic.layout(Unknown Source)
>     ....
>     ....
> 
> But I'm not using SVG but just a simple JPG image! Any idea? I need some 
> help... Thanks!!


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org