You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Josh Bosquez <jb...@directorsinc.com> on 2003/01/22 23:02:49 UTC

fop svg external graphic error

When I try to use a svg file as an extenal graphic I get this error:
 
[ERROR] Could not load external SVG:
http://xml.org/sax/features/validation
[ERROR] Error while creating area : No ImageReader for this type of
image (file:
C:/resin-2.1.4/webapps/df/svg/boxes.svg).
 
I am using it in the FopServlet example.  The servlet container is resin
with jdk1-4.
 
This is the code snippet from my xsl:fo file:
 
<fo:block>          
       <fo:external-graphic
src="file:C:/resin-2.1.4/webapps/df/svg/boxes.svg"/>
 </fo:block>  
 
When I run the XSL file through the FO plugin of XMLSpy, the PDF is
generated
with no problems.
 
Any suggestions?
 
thanks,
Josh
 

RE: fop svg external graphic error

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "JB" == Josh Bosquez <jb...@directorsinc.com> writes:

JB> When I try to use a svg file as an extenal graphic I get this
JB> error: [ERROR] Could not load external SVG:
JB> http://xml.org/sax/features/validation [ERROR] Error while
JB> creating area : No ImageReader for this type of image (file:
JB> C:/resin-2.1.4/webapps/df/svg/boxes.svg).
 
JB> I am using it in the FopServlet example.  The servlet container is
JB> resin with jdk1-4.
 
JB> This is the code snippet from my xsl:fo file:
 
JB> <fo:block> <fo:external-graphic
JB> src="file:C:/resin-2.1.4/webapps/df/svg/boxes.svg"/> </fo:block>
 
JB> When I run the XSL file through the FO plugin of XMLSpy, the PDF
JB> is generated with no problems.

JB> Any suggestions?

    I'm not really a FOP person.  Two ideas come to mind however.
1) FOP may simply not support svg files as external images, you
   may need to use inline svg, at least to bootstrap (as Batik
   does understand external SVG files):

 <fo:block>
   <svg:svg width="..." height="..." ....>
       <svg:image xlink:href="...."/>
   </svg::svg>
 </fo:block>

2) It is possible that the SVG reader isn't getting registered with
   your FOP install.  Since I think SVG is optional it may require
   adding a services file, or adjusting some source code to activate
   this.

   This is probably better asked on a FOP list as the problem appears
to be the linkage piece (FOP has, thankfully, traditionally managed
the FOP<->Batik linkage).

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