Hi Alexis,
Thank you for your detailed answer.
It's work fine with out.close(); in finally section.
Christian Pestel
[email protected]
-----Message d'origine-----
From: Alexios Giotis
Sent: Tuesday, May 29, 2012 12:29 PM
To: Christian Pestel
Cc: fop-users
Subject: Re: pdf file not closed in case of invalid fo / fop Trunk
Hi Christian,
I assume you are using FOP embedded in a java application. In this case, FOP
public API takes as an argument an output stream to write the specified
output format, for example, see [1]. Make sure that the output stream is
closed by your code, when an exception is thrown, as in the finally block
near the end of [1]. If the file is still kept open, then a small java code
reproducing the problem would help.
HTH,
Alexis Giotis
[1]
http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java
On May 29, 2012, at 1:11 PM, Christian Pestel wrote:
Hello developpers,
When an invalid fo is converted to pdf, a Fop error occured.
Created pdf file has a zero filesize, and it’s not possible to delete the
pdf file because file seems not closed by Fop in this case; the only
solution is to restart java.exe.
in my example, I replace fo: block by fo: block1
org.apache.fop.fo.ValidationException:
"{http://www.w3.org/1999/XSL/Format}block1" is not a valid child of
"fo:flow"!
Christian Pestel
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]