well, the failure is occuring when seeking for the startxref entry... I know that some code was added recently to be very aggressive when searching for startxref - from what I'm seeing here, the code must be building up a massive array of the all of the file contents as it goes seeking. If the file is big enough, it'll all wind up getting loaded into RAM.
The code that does this is in getStartxref. A quick review indicates that it would be fairly easy to rewrite so it doesn't do this, so I've done that - it's available in the latest svn HEAD. Note: I didn't do any sort of exhaustive check on this. I made sure that it didn't break for properly constructed PDF files, but I have not tested it against a PDF that is missing the startxref (or has it placed oddly). Please give it a whirl on your bad file and see how it goes. -- View this message in context: http://itext-general.2136553.n4.nabble.com/itext-outOfMemoryError-when-attempting-to-count-number-of-pages-in-a-PDF-file-tp3701287p3702764.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ iText-questions mailing list [email protected] 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
