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

Ghi Om closed PDFBOX-1354.
--------------------------

    Resolution: Duplicate

Sorry, dup of bug 1088
                
> PDDocument#getPageMap() is broken
> ---------------------------------
>
>                 Key: PDFBOX-1354
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1354
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.6.0
>         Environment: Probably any.
>            Reporter: Ghi Om
>            Priority: Minor
>
> A class cast exception is thrown when using the method PDDocument#getPageMap()
>     public static void main(String[] args) throws Exception {
>         File f = new File("C:/test.pdf");
>         PDDocument d = PDDocument.load(f);
>         PDDocumentOutline o = d.getDocumentCatalog().getDocumentOutline();
>         Map<String, Integer> m = d.getPageMap();
>     }
> Stacktrace :
> Exception in thread "main" java.lang.ClassCastException: 
> org.apache.pdfbox.pdmodel.PDPage cannot be cast to 
> org.apache.pdfbox.cos.COSObject
>       at 
> org.apache.pdfbox.pdmodel.PDDocument.processListOfPageReferences(PDDocument.java:163)
>       at 
> org.apache.pdfbox.pdmodel.PDDocument.processListOfPageReferences(PDDocument.java:167)
>       at 
> org.apache.pdfbox.pdmodel.PDDocument.generatePageMap(PDDocument.java:152)
>       at org.apache.pdfbox.pdmodel.PDDocument.getPageMap(PDDocument.java:242)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to