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

John Hewson commented on PDFBOX-2183:
-------------------------------------

Wouldn't it be better to unpack the inner array and use that as the rectangle 
rather than returning null?

> COSArray cannot be cast to COSNumber
> ------------------------------------
>
>                 Key: PDFBOX-2183
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2183
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.8.6, 1.8.7, 2.0.0
>            Reporter: simon steiner
>            Assignee: Tilman Hausherr
>              Labels: Annotations
>             Fix For: 1.8.7, 2.0.0
>
>         Attachments: input.pdf
>
>
> java -jar ~/pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar PDFToImage 
> input.pdf
> Exception in thread "main" java.lang.ClassCastException: 
> org.apache.pdfbox.cos.COSArray cannot be cast to 
> org.apache.pdfbox.cos.COSNumber
>       at org.apache.pdfbox.cos.COSArray.toFloatArray(COSArray.java:530)
>       at 
> org.apache.pdfbox.pdmodel.common.PDRectangle.<init>(PDRectangle.java:97)



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

Reply via email to