Hi! I have a trouble with FOP
I have an aplication which generates a temporary
XML for generating a PDF document. After doing that, the XML file is
removed.
It worked right with FOP 0.18.1. Now I've had to
update it to FOP 0.20.3rc and it doesn't work propertly.
The problem is that the driver.render method locks
the XML file and I canīt delete it (and I NEED to do it)
Here's the code around the driver.render that
causes de trouble.
driver.setErrorDump(true);
driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); // <--- Here I can delete de XML
file
driver.render(xsltPfInput.getParser(),
xsltPfInput.getInputSource());
byte[]
content = out.toByteArray();
objPfResponse.setContentLength(content.length);
objPfResponse.getOutputStream().write(content);
objPfResponse.getOutputStream().flush();
objPfResponse.getOutputStream().close(); out.close(); // <--- Here I can't delete de XML
file
Thanks a lot to anyone for any
help
|