Hi,

 

My requirement is to create a PDF using iText 2.1.2 which would contain
more than 30,000 pages.

 

My application writes data (Text, Rectangle, images etc.) to Graphics2D
object.

 

I have created Graphics2D object by using the following:

 

PdfTemplate pdfTemplate = pdfContentByte.createTemplate(width, height);

Graphics2D g2 = pdfTemplate.createGraphicsShapes(width, height);

 

This code runs well up to 1000 pages and gets "Exception in thread
"main" java.lang.OutOfMemoryError: Java heap space" for more number of
pages.

I have increased Java heap size to 512Mb. Works fine up to 5000 pages
and again same error.

 

If I create Graphics2D object from PdfContentByte using the following:

Graphics2D g2 = pdfContentByte.createGraphicsShapes(width, height);

This code works fine for more than 30,000 pages.

 

 

I have to use pdfTemplate for the following reasons:

 

1. Some data in each page would be repeated, so that time to create the
PDF and size of the PDF can be reduced with this.

2. I have to create some PDFs with pages at 90 degree rotation which can
be done by adding pdfTemplate to pdfContentByte.

 

 

So please suggest me creating PDF (which would contain more than 30,000
pages) using pdfTemplate.

 

 

Thanks & Regards

Pradeep Kumar B
Sr. Software Engineer, Java Team

Aptuit Informatics <http://www.aptuitinformatics.com/> 

Division of Aptuit Laurus Pvt. Ltd.

Plot No. 100-101
Export Promotion Industrial Park
Whitefield, Bangalore 560 066 India


+91 80 4190 7800 (office)

+91 80 4190 7907 (Direct) 

+91 80 4190 7805 Fax 

www.Aptuit.com <blocked::http://www.aptuit.com/> 
pradeep.ba...@aptuit.com <blocked::mailto:sumit.ran...@aptuit.com> 

 

 

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender by email
reply and delete it from your system.
The integrity and security of this email cannot be guaranteed on the Internet.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to