Hi, We are using below PDFReader to read the document and then we are using the PDFStamper to stamp the overlays.
PDFReader reader = new PdfReader(new RandomAccessFileOrArray(fileInputStream),null) PdfStamper stamper = new PdfStamper(orgReader, new FileOutputStream( filledTemplateName)); Increasing the memory is not an option to us, since we have already did to the max heap size. Please do the needful and let me know if you need any more details, Thanks, Mahesh From: 1T3XT BVBA [mailto:[email protected]] Sent: Thursday, March 03, 2011 12:55 PM To: [email protected] Subject: Re: [iText-questions] Out of memory with PdfStamper API Op 2/03/2011 15:24, Mahesh Dandu - ERS, HCL Tech schreef: Hi, We are using PdfStamper to apply the overlays by using the methods like "getUnderContent" and "getOverContent". Once these operations complete, we are using stamper.close() to close the stamper. This works fine for all the documents and the overlays are applying correctly. However, for the documents which are having size more than 400MB, we are getting an error saying there is no enough space(Out of memory error) when we are calling stamper.close(). Please let us know is there any API that we can make use to overcome this problem and can apply overlays for any size of documents. Throw more memory at your application, or try a PdfReader constructor that requires less memory. ________________________________ ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. -----------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText® is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
