Thanks John, You pinout exact cause. Now I can process large pdf files pretty good.
Here is what i did misteks. 1) I was using iText-2.7 which eventually fails to process large pdf documents (larger than about 30 Megs). 2) while upgrating my code from iText-2.7 to iText-5.3.0, i was only replacing library and leaving my classes unchanged. (compiled with iText-2.7, this was reallly funny. But John pointout this. Thanks John) Conclusion, iText-5.3.0 can process larger pdf files, but iText-2.7 PdfReader fails to read large pdf document. On Fri, Jul 13, 2012 at 4:44 PM, John Renfrew <r...@btclick.com> wrote: > If you are using 5.0.3 how come you are getting com.lowagie.text.pdf errors?? > > Sent while on the move > > On 13 Jul 2012, at 07:10, Hanmant Sapkal <hanmant.sap...@gmail.com> wrote: > >> PdfReader reader; >> RandomAccessFileOrArray raFileOrArray = new >> RandomAccessFileOrArray("/tmp/large-file.pdf"); >> reader = new PdfReader(raFileOrArray, null); >> >> This also cause same exception: >> >> java.lang.StackOverflowError >> at java.util.HashMap$KeySet.iterator(HashMap.java:867) >> at com.lowagie.text.pdf.PdfReader.removeUnusedNode(Unknown Source) >> at com.lowagie.text.pdf.PdfReader.removeUnusedNode(Unknown Source) >> at com.lowagie.text.pdf.PdfReader.removeUnusedNode(Unknown Source) >> >> On Fri, Jul 13, 2012 at 4:26 PM, Paulo Soares <pgpsoa...@gmail.com> wrote: >>> PdfReader reader; >>> RandomAccessFileOrArray raFileOrArray = new >>> RandomAccessFileOrArray("/tmp/large-file.pdf"); >>> reader = new PdfReader(raFileOrArray, null); >>> >>> Paulo >>> >>> On Fri, Jul 13, 2012 at 11:47 AM, Hanmant Sapkal >>> <hanmant.sap...@gmail.com> wrote: >>>> Hello, >>>> >>>> We are facing a problem while reading large Pdf files (around above 32 >>>> Meg with 5000 pages). >>>> I am using itext-5.3.0 System configuration = Solaris with >>>> Weblogic-9.2 and JVM HotSpot >>>> >>>> I tried bellow constuctors to read the Pdf >>>> >>>> 1. PdfReader(byte[] pdfIn) >>>> 2. PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword) >>>> 3. PdfReader(String filename) >>>> >>>> But all of above stuck when Pdf is larger than 32 Meg >>>> >>>> java.lang.StackOverflowError >>>> at java.util.HashMap$KeySet.iterator(HashMap.java:867) > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > iText(R) 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 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) 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