I have the same setup but I'm calling FOP from an embedded application (NOT a web application - no tomcat or other server).
Here's the code from my render() method:


ByteArrayOutputStream out = new ByteArrayOutputStream();
DOMResult xslFODomResult = transformPDF("/some/pathto/a/stylesheet/pdf.xsl");
Driver driver = new Driver();
driver.setRenderer(driver.RENDER_PDF);
driver.setOutputStream(out);
org.w3c.dom.Document foDoc =(org.w3c.dom.Document) xslFODomResult.getNode();
driver.render(foDoc);
return (out.toByteArray());


That's why I'm trying to figure out where FOP is getting the directory path to "image.jpg" from. It doesn' t work in this situation.
Is FOP using some kind of classpath directory???



Thanks Mike On Wednesday, March 13, 2002, at 09:59 AM, Magnus Sjöberg wrote:


That's bizarre, I 'assumed' FOP used the current directory as its base dir... I ran the following command with test.xml, test.xsl and image.jpg in the current directory:

current_dir> java org.apache.fop.apps.Fop -xml test.xml -xsl
test.xsl -pdf test.pdf

All images in the xml are added to the fo using
<fo:external-graphic src="image.jpg"/>
This produces no errors.
Exactly what sequence of events are you using to create the
PDF?

///Magnus



Reply via email to