Interesting. I think I shall try to reproduce the problem in a quiet
moment.
Thanks for the code snippet. A note on that: I consider it better style
to put the close() in a finally section so you don't have to make sure
that the close() is called in every situation (exception or not).
On 13.03.20
ocessing
transformer.transform(src, res);
// Flush the buffered output before exiting
out.flush();
out.close();
// Help garbage collection
res = null;
src = null;
transformer = null;
factory = null;
fop = null;
foUserAgent = null;
} catch (Exception e) {
try { out.
Closing the buffered out without flushing causes the PDF file to be closed
before all data is written to it. Originally when I started working with the
embedded FOP I had this problem...adding the flush got rid of the problem
completely.
Another user had the same problem and reported it on 3/6/07
flush()). So I see no need for an explicit flush(). Could you
please state which OutputStream implementation are used in your code?
On 12.03.2007 22:52:30 Jeff Vannest wrote:
> Will someone add "out.flush()" to the embedding example on the FOP
> website...for example, at
> http:
Will someone add "out.flush()" to the embedding example on the FOP
website...for example, at
http://xmlgraphics.apache.org/fop/0.93/embedding.html?
It seems a shame that everyone embedding FOP learns to flush() by trial and
error.
Th