[ 
https://issues.apache.org/jira/browse/PDFBOX-2290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Indra Kumar updated PDFBOX-2290:
--------------------------------

    Attachment: MergePDFWithPDFBOX.java

Hi Maruan,

Here is my sample code I am using for file merging. Please check once. I tried 
5 100MB files for merging I am getting exception. Can you try with 5 to 6 100MB 
files. I attached java file please find the attachment. 

And I want to know that is it better than iText in performance wise? Can you 
help in that? 

Thanks & Regards
Indra Kumar Malle
[email protected]





 



> Exception while Merging Large files
> -----------------------------------
>
>                 Key: PDFBOX-2290
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2290
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.8.6
>            Reporter: Indra Kumar
>            Priority: Critical
>         Attachments: MergePDFWithPDFBOX.java
>
>
> I am getting below exception while merging large files and it supports only 5 
> to 6 documents only. Can you any one help me?
> 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



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to