xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Error while processing xml and xslt files to pdf
Date Wed, 05 Nov 2008 17:13:09 GMT
Check what JVM is in use. If it's not a Sun JVM, then switch to that.
Otherwise, you might want to try one of the other options listed here:
http://xmlgraphics.apache.org/fop/stable/graphics.html#batik

On 05.11.2008 17:04:26 Ronald McDonald wrote:
> 
> Hello,
> 
> I'd like to produce a pdf file with fop from an xml with a xslt file using
> the following command:
> 
> fop -c fopconf.xconf -xml my.xml -xsl my.xsl -pdf my.pdf
> 
> Mac OS X with fop installed via ports does everything right, I get the
> expected result as a pdf. But using the same command on a remote debian
> system, i get the following error:
> 
> "(.:XXXXX): Gtk-WARNING **: cannot open display:"
> 
> Where "XXXXX" semms to be a random number that changes on every call.
> 
> I looked at the fop-script and enabled the debug mode. This display the
> following command under Mac OS X:
> 
> /System/Library/Frameworks/JavaVM.framework/Home/bin/java"
> 	-classpath
> 		"/opt/local/share/java/fop/0.94/lib/xmlgraphics-commons-1.2.jar
> 		:/opt/local/share/java/fop/0.94/lib/xml-apis-1.3.02.jar
> 		:/opt/local/share/java/fop/0.94/lib/xercesImpl-2.7.1.jar
> 		:/opt/local/share/java/fop/0.94/lib/xalan-2.7.0.jar
> 		:/opt/local/share/java/fop/0.94/lib/serializer-2.7.0.jar
> 		:/opt/local/share/java/fop/0.94/lib/commons-logging-1.0.4.jar
> 		:/opt/local/share/java/fop/0.94/lib/commons-io-1.3.1.jar
> 		:/opt/local/share/java/fop/0.94/lib/batik-all-1.6.jar
> 		:/opt/local/share/java/fop/0.94/lib/avalon-framework-4.2.0.jar
> 		:/opt/local/share/java/fop/0.94/build/fop.jar"
> 	-Djava.awt.headless=true
> 	org.apache.fop.cli.Main
> 	"-c" "fopconf.xconf"
> 	"-xml" "my.xml"
> 	"-xsl" "my.xsl"
> 	"-pdf" "my.pdf"
> 
> For working on command line, I have to add the "-Djava.awt.headless=true" in
> the fop script as seen above.
> 
> Enabling the debug mode on debian I get the following command:
> 
> /usr/bin/java
> 	-classpath
> 		"/usr/share/java/xmlgraphics-commons.jar
> 		:/usr/share/java/xercesImpl.jar
> 		:/usr/share/java/servlet-api.jar
> 		:/usr/share/java/commons-logging.jar
> 		:/usr/share/java/batik-all.jar
> 		:/usr/share/java/xml-apis.jar
> 		:/usr/share/java/xalan2.jar
> 		:/usr/share/java/serializer.jar
> 		:/usr/share/java/avalon-framework.jar
> 		:/usr/share/java/commons-io.jar
> 		:/usr/share/java/fop.jar:"
> 	-Djava.awt.headless=true
> 	org.apache.fop.cli.Main
> 	"-c" "my.xconf"
> 	"-xml" "my.xml"
> 	"-xsl" "my.xsl"
> 	"-pdf" "my.pdf"
> 
> The "-Djava.awt.headless=true" was already in the fop script on debian
> lenny.
> 
> When i comment the following line in my xslt file everything works fine,
> without the Gtk-Warning:
> 
> <fo:external-graphic src="myLogo.gif" content-width="32mm"/>
> 
> I have tried different image types (gif, bmp, jpg and png) and vector
> grapics (svg). I also tried embedding the vector graphic with
> <fo:instream-foreign-object/> which works fine on the mac, but not on the
> debian system. I always get the Gtk-Warning on the debian system and the pdf
> file cannot be opened with a pdf reader.
> 
> 
> 
> -- 
> View this message in context: http://www.nabble.com/Error-while-processing-xml-and-xslt-files-to-pdf-tp20343295p20343295.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 



Jeremias Maerki


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


Mime
View raw message