hello!
i'd like to batch convert rtf files to pdf files.
i have no problem with single conversions,
but my program fails with a DocumentException
"The document has been closed. You can't add any Elements"
when i put the whole conversion in a loop iterating over files.
please give me some hint!
thanks in advance,
jb.
for(all the files) {
convert(file)
}
synchronized convert(file) {
RtfParser = new RtfParser();
Document document = new Document();
PdfWriter writer = new PdfWriter.getInstance(document, outputStream);
document.open();
rtfParser.convertRtfDocument(inputstream, document);
document.close();
// not necessary
document = null;
RtfParser = null;
}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar