Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

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!
Tasklist

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
Category
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

Details

Description:

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(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(Unknown Source)
...

Steps to reproduce:

1 - fetch this DocBook sample ( from ubuntu's launchpad ) :
http://launchpadlibrarian.net/18917141/sample.xml

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

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

4 - fop sample.fo -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 sample.fo 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.

Loading...