You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/09/12 15:13:34 UTC
[jira] [Commented] (PDFBOX-2345) IndexOutOfBoundsException reading
encrypted pdf
[ https://issues.apache.org/jira/browse/PDFBOX-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131505#comment-14131505 ]
Tilman Hausherr commented on PDFBOX-2345:
-----------------------------------------
Your file is incorrect:
{code}
<<
/Type /ObjStm
/N 4
/First 24
/Length 500
>>
{code}
That means that your object stream contains 4 objects.
And this is your stream:
{code}
9 0
10 66
11 144
12 207
<<
/Type /StructElem
/S /Document
/P 8 0 R
/K [10 0 R]
>>
<<
/Type /StructElem
/S /Part
/P 9 0 R
/Lang (en-GB)
/K [11 0 R]
>>
<<
/Type /StructElem
/S /Sect
/P 10 0 R
/K [12 0 R]
>>
<<
/Type /StructElem
/S /P
/P 11 0 R
/K [<<
/Type /MCR
/Pg 15 0 R
/MCID 0
>>
<<
/Type /MCR
/Pg 15 0 R
/MCID 1
>>
<<
/Type /MCR
/Pg 15 0 R
/MCID 2
>>
<<
/Type /MCR
/Pg 15 0 R
/MCID 3
>>
<<
/Type /MCR
/Pg 15 0 R
/MCID 4
>>
]
>>
-
{code}
Whats this "-"? This would be the 5th object. (The 4th object is longer than it appears at first sight, because of the "[")
> IndexOutOfBoundsException reading encrypted pdf
> -----------------------------------------------
>
> Key: PDFBOX-2345
> URL: https://issues.apache.org/jira/browse/PDFBOX-2345
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.0
> Reporter: simon steiner
> Attachments: out.pdf
>
>
> java -jar ~/pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar WriteDecodedDoc -nonSeq out.pdf
> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
> at java.util.ArrayList.rangeCheck(ArrayList.java:635)
> at java.util.ArrayList.get(ArrayList.java:411)
> at org.apache.pdfbox.pdfparser.PDFObjectStreamParser.parse(PDFObjectStreamParser.java:110)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)