From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 12:12 PM
To: iText MailingList
Subject: [iText-questions] Out of Memory Error


Hi,

We are able to generate a pdf file of 10,000 records on WAS 3.5 Server - 64 MB Heap size. The generated pdf file is 6.3 MB in size.  

When we try to generate the file containing 12,000 records, the application crashes, throwing java.lang.OutOfMemoryError.

Can anyone tell me:

1. Why does iText crash ? What is the most memory intensive part of it ? ( FYI: Our report is full of table rows, if that matters. We are breaking the table on every page end...)  
 
An OutOfMemoryError will crash any application. I've generated several 100M pdf with a 64M heap, all you have to do is be careful, specially with tables. As I don't know how you are using the tables, I can't give you any advice. 

2. Is there any way to remove the Memory error , besides increasing the heap size?  
 
Omelets without eggs? See 1.

3. Currently we are sending the output to servlet output stream. Will there be any difference if we write the output to a disk file and then give the url for downloading that file to the user ?  
 
Probably not, if you are not storing the pdf in a byte array.
 
Best Regards,
Paulo Soares 

It will be really helpful if someone throws light on this memory issue.

Thanks,
Amit Mathur

Reply via email to