You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2022/01/06 16:45:00 UTC

[jira] [Commented] (PDFBOX-5357) java.lang.IndexOutOfBoundsException

    [ https://issues.apache.org/jira/browse/PDFBOX-5357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470040#comment-17470040 ] 

Andreas Lehmkühler commented on PDFBOX-5357:
--------------------------------------------

2.0.22 doesn't include the fix of PDFBOX-5072, please update to the latest version 2.0.25

>  java.lang.IndexOutOfBoundsException
> ------------------------------------
>
>                 Key: PDFBOX-5357
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5357
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel, Utilities
>    Affects Versions: 2.0.22, 3.0.0 PDFBox
>            Reporter: krishnan
>            Assignee: Tilman Hausherr
>            Priority: Critical
>
> Caused by: java.lang.IndexOutOfBoundsException: Index: 111, Size: 111
>     at java.util.ArrayList.rangeCheck(ArrayList.java:657)
>     at java.util.ArrayList.get(ArrayList.java:433)
>     at org.apache.pdfbox.cos.COSArray.getObject(COSArray.java:188)
>     at org.apache.pdfbox.pdmodel.common.PDNameTreeNode.getNames(PDNameTreeNode.java:272)
>     at org.apache.pdfbox.multipdf.PDFMergerUtility.getIDTreeAsMap(PDFMergerUtility.java:1036)
>     at org.apache.pdfbox.multipdf.PDFMergerUtility.getIDTreeAsMap(PDFMergerUtility.java:1051)
>     at org.apache.pdfbox.multipdf.PDFMergerUtility.mergeIDTree(PDFMergerUtility.java:1008)
>     at org.apache.pdfbox.multipdf.PDFMergerUtility.appendDocument(PDFMergerUtility.java:877)
>     at org.apache.pdfbox.multipdf.PDFMergerUtility.legacyMergeDocuments(PDFMergerUtility.java:459)
>     at org.apache.pdfbox.multipdf.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:346)
>     at com.vuram.plugins.pdfutilities.MergePDF.runSmartService(MergePDF.java:46)
>     at com.vuram.plugins.pdfutilities.AbstractPDFDocumentGeneration.run(AbstractPDFDocumentGeneration.java:66)
>     ... 16 more
>  
> We are facing the above error on merging certain types of pdf documents unfortunately we will not be sharing the files.
> Please find the snippet below,
> PDFMergerUtility mergePdf = new PDFMergerUtility();
>         for (Long filename : documents) {
>             documentPath = cs.getInternalFilename(filename);
>             mergePdf.addSource(new File(documentPath));
>         }
>         mergePdf.setDestinationFileName(cs.getInternalFilename(docId));
>         mergePdf.mergeDocuments(MemoryUsageSetting.setupTempFileOnly());
>  
> We found the suggested solution in the below ticket but still issue is persist.
> URL : https://issues.apache.org/jira/browse/PDFBOX-5072
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org