Hi all!

I'm producing pdf (and rtf) heavy documents, the same document for example in 
pdf is a 1500 pages document of 2.8 MB size, while the rtf is a 1145 pages of 
81 MB size.

My problem is memory, but perhaps the cause is in the way that I managed the 
whole process of document creation, that is:

before getting the instance of Writer object and adding all the necessary 
elements to the document, that is before doing this:
PdfWriter pdfWriter = PdfWriter.getInstance(itextDocument, new 
FileOutputStream(new File(outputFilePath, outputFileName)));

for ( ... ) {
        itextDocument.add(...);
}


Well, I was saying, before executing those lines, I have to convert myObjects 
to Itext Element objects, this requires much memory. Perhaps, to reduce memory 
usage, and to exploit better the Itext characteristics I should add an Element 
as soon as possible. Is a correct assertion?

I think that Itext, because produce a document using a "Writer" each time I add 
an Element, that Element is written to disk and flushed from memory, is correct?

Sorry for the english, I hope that you can understand my doubts :-)

Thank you very much,

best regards.

Raffaele





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to