Hi everybody,
our application requires exporting data with around 20000 rows and 45
columns. Due to this huge amount of data the memory usage
for this export is around 700 MB of Memory. First we create a PDFTable with
all our cell objects and then call a different method to split the table
over several pages if needed. I think the problem is that we keep
the whole table before splitting in the memory. Is there any common way
solve this memory issue and reduce memory usage for wide tables?
For normal tables we with columns < 10 we use the memory performance hint
from the iText examples. This works perfectly.
For wide tables we use following code example to spilt our tables and write
to the document. This code is wrapped around some loops to go throw the
whole PDFTable.
content_table.writeSelectedRows(startcolumn, endcolumn, 0,
1, 35, headerYPosition, pdfWriter.getDirectContent());
content_table.writeSelectedRows(startcolumn, endcolumn,
startrow, endrow, 35, tableYPosition, pdfWriter.getDirectContent());
this.document.newPage();
startcolumn = startcolumn + columnsPerPage;
endcolumn = endcolumn + columnsPerPage;
Best regards
David
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/