You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Malle, Indra" <In...@bkfs.com> on 2014/08/26 14:21:29 UTC

Java heap space issue while reading larger size pdf document.

Hi,

I am getting below exception while merging large files in to single file. Please help me any one.

Exception Information :


org.apache.pdfbox.exceptions.WrappedIOException
                at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:267)
                at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1216)
                at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1183)
                at org.apache.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:236)
                at org.apache.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:185)
                at com.ls.lsauth.login.business.LsSession.getSession(LsSession.java:615)
                at jrun__LsAuth__Application__LsLogin__Login__UserRoles2ejsp2f._jspService(jrun__LsAuth__Application__LsLogin__Login__UserRoles2ejsp2f.java:163)
                at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
                at jrun.jsp.JSPServlet.service(JSPServlet.java:119)
                at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
                at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
                at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
                at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
                at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
                at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
                at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
                at java.util.ArrayList.RangeCheck(ArrayList.java:547)
                at java.util.ArrayList.get(ArrayList.java:322)
                at org.apache.pdfbox.io.RandomAccessBuffer.seek(RandomAccessBuffer.java:110)
                at org.apache.pdfbox.io.RandomAccessFileOutputStream.write(RandomAccessFileOutputStream.java:106)
                at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
                at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
                at java.io.FilterOutputStream.close(FilterOutputStream.java:140)
                at org.apache.pdfbox.pdfparser.BaseParser.parseCOSStream(BaseParser.java:634)
                at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:609)
                at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:194)
                ... 15 more

Thanks & Regards
Indra Kumar Malle
Indra.malle@lpsvcs.com
[Description: Description: Description: cid:image001.jpg@01CF1200.6AC418D0]

The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.