[
https://issues.apache.org/jira/browse/PDFBOX-2183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053098#comment-14053098
]
Tilman Hausherr edited comment on PDFBOX-2183 at 7/6/14 11:24 AM:
------------------------------------------------------------------
Excerpt from your PDF (when uncompressed):
{code}
/Rect [ [ 165.15 186.18 289.54 199.68 ] ]
{code}
It should be
{code}
/Rect [ 165.15 186.18 289.54 199.68 ]
{code}
I added a check that the rectangle is really a rectangle in rev 1608184 for the
trunk and rev 1608185 for the 1.8 branch. You'll see this output now:
{code}
WARN [main] org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation:220
- COSArray{[COSArray{[COSFloat{165.15}, COSFloat{186.18}, COSFloat{289.54},
COSFloat{199.68}]}]} is not a rectangle array, returning null
{code}
was (Author: tilman):
Excerpt from your PDF (when uncompressed):
{code}
/Rect [ [ 165.15 186.18 289.54 199.68 ] ]
{code}
It should be
{code}
/Rect [ 165.15 186.18 289.54 199.68 ]
{code}
I added a check that the rectangle is really a rectangle in rev 1608184 for the
trunk. You'll see this:
{code}
WARN [main] org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation:220
- COSArray{[COSArray{[COSFloat{165.15}, COSFloat{186.18}, COSFloat{289.54},
COSFloat{199.68}]}]} is not a rectangle array, returning null
{code}
> COSArray cannot be cast to COSNumber
> ------------------------------------
>
> Key: PDFBOX-2183
> URL: https://issues.apache.org/jira/browse/PDFBOX-2183
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.8.6, 1.8.7, 2.0.0
> Reporter: simon steiner
> 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)