new PdfReader(new RandomAccessFileOrArray("filename.pdf"), null) will work.
Don't use a stream, it will be read first into memory and you'll gain nothing.
Paulo ________________________________ De: [EMAIL PROTECTED] em nome de Bill Sanders Enviada: dom 15-Out-06 16:05 Para: [email protected] Assunto: [iText-questions] PDFReader - Exception in thread "main"java.lang.OutOfMemoryError: Java heap space I'm trying to process large PDF documents (600MB or larger), consisting of about 27,000 pages and I get "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space". I've tried using PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword) class and still the error presents itself. Code snip-it: BufferedInputStream bisStream = new BufferedInputStream(new FileInputStream(fPdfFile)); RandomAccessFileOrArray rafPdfIn = new RandomAccessFileOrArray(bisStream); byte[] bPassword = null; PdfReader reader = new PdfReader(rafPdfIn, bPassword); I've increased the JVM from 512m to 1024m, but the "OutOfMemoryError" still exists. I cannot go any higher on the memory, since I only have 1GB on my laptop and I get other JVM memory allocation errors. Of course performance running this high of VM takes over the system. The application purpose is to split this large PDF into goups based on policy decollation requirements. This file consists of 1,000 policies, which I need to break down into individual policies for further processing. Any assistance or guidence would be greatly appreciated. Thanks in advance, Bill ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message.
<<winmail.dat>>
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
