Hi! I have a problem 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 after using
the Driver.render method the XML file is locked 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 for any
sugestions
|