We have successfully generated reports in exceess of 7000 pages using iText. We use the fitsPage call to write out only one page at a time to control memory and allow reports to scale like this. In short, we add a row, use the pdfWriter.fitsPage() to determine if the row will cause a new page, and if it does, retract the row, add the pdf table to the document, create a new table (with the appropriate headers), re-add the row to the table, and go on. This is a little slower since it has to determine at each row whether a page boundary will be hit, but the memory footprint is small and, more appreciably, it works!


From: "Paulo Soares" <[EMAIL PROTECTED]>
To: "Sudame, Rahul \(Cognizant\)" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
CC: <[EMAIL PROTECTED]>
Subject: [iText-questions] Re: iText performance issue
Date: Sat, 28 Jun 2003 11:27:43 +0100


I suspect that another exception was thrown that prevented the writing of
even a single page. If you really want to build a giant table use PdfPTable
that doesn't have those performance issues but you should build a page at
time. Do a search on the mailing list for "fitsPage", there's code for a
page at a time.

Best Regards,
Paulo Soares

----- Original Message -----
From: "Sudame, Rahul (Cognizant)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, June 28, 2003 9:27
Subject: iText performance issue


> Hi, > > We have observed that if the contents passed to the iText tool for > PDFGeneration exceeds around 500 pages then the following error is > thrown: > > ExceptionConverter: java.io.IOException: The document has no pages. > at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source) > at com.lowagie.text.pdf.PdfWriter.close(Unknown Source) > at com.lowagie.text.pdf.PdfDocument.close(Unknown Source) > at com.lowagie.text.Document.close(Unknown Source) > > We are trying to a add "Table" object in the PDF document with dynamic > number of rows. If the dynamic number of rows are huge then the > performance is severely affected and finally "IOException" is thrown. > > Can anybody suggest any solution for this exception ? Apart from this > issue, what steps / configurations can be added so as to improve the PDF > generation time of iText ? > > Thanks and Regards, > Rahul Sudame. >



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to