Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#16216 - [fop] doesn't render included svg

Attached to Project: Community Packages
Opened by Hugre (hugre) - Wednesday, 16 September 2009, 14:15 GMT
Last edited by Stefan Husmann (stefanhusmann) - Monday, 21 September 2009, 19:32 GMT
Task Type Bug Report
Status Closed
Assigned To Stefan Husmann (stefanhusmann)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



when rendering a XSL-FO document to pdf, when the XSL-FO document sources an SVG image, the process crashes, and the image is not included in the targe pdf

Additional info:
* fop 0.95
* java-batik 1.7-6
* java-xmlgraphics-commons 1.3.1-3
* error msg :
java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(Unknown Source)

Steps to reproduce:

1 - fetch this DocBook sample ( from ubuntu's launchpad ) :

2 - xsltproc --output --stringparam use.extensions 0 /usr/share/xml/docbook/xsl-stylesheets-1.74.0/fo/docbook.xsl sample.xml

3 - Edit the file, to chage the path of the included svg :
<imagedata fileref="/path/to/a/svg/image/on/your/system.svg" ...

4 - fop -pdf sample.pdf
( errors on ouput and pdf file doesn't display the image )

Steps to resolve :

1 - Edit /usr/bin/fop
insert on line 250 : LOCALCLASSPATH="$LOCALCLASSPATH:/usr/share/java/batik/xml-apis-ext.jar"

Dirty, but did the job.
This task depends upon

Closed by  Stefan Husmann (stefanhusmann)
Monday, 21 September 2009, 19:32 GMT
Reason for closing:  No response
Additional comments about closing:  probably fixed.
Comment by Stefan Husmann (stefanhusmann) - Friday, 18 September 2009, 05:38 GMT
I cannot reproduce this. I do not have that .svg, and has no imagedata entity.
Comment by Stefan Husmann (stefanhusmann) - Sunday, 20 September 2009, 11:50 GMT
Please try to add CLASSPATH="$CLASSPATH:/usr/share/java/batik/xml-apis-ext.jar" to the file /etc/fop.conf.