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

Maruan Sahyoun commented on PDFBOX-1088:
----------------------------------------

The issue was introduced in rev. 1092855 by changing the line in the method 
processListOfPageReferences

from
COSArray pageArray = 
((COSArrayList)(((PDPage)pageOrArray).getParent()).getKids()).toList();

to
List pageArray = ((((PDPage)pageOrArray).getParent()).getKids());

For the newer version the next line 

parseCatalogObject((COSObject)pageArray.get(i)); will fail as get will return a 
PDPage where for the original version it will return a COSObject.

I'll submit a patch to revert to the original version.




> Class PDDocument Method getPageMap returns a ClassCastException
> ---------------------------------------------------------------
>
>                 Key: PDFBOX-1088
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1088
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.6.0
>         Environment: Windows XP 
>            Reporter: Nghi Nguyen
>             Fix For: 1.7.0
>
>         Attachments: PDDocument.patch
>
>
> Trying to get the map of bookmarks to page numbers by using method getPageMap 
> but throws a java.lang.ClassCastException: org.apache.pdfbox.pdmodel.PDPage

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to