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

ASF subversion and git services commented on PDFBOX-2622:
---------------------------------------------------------

Commit 1653981 from [~tilman] in branch 'pdfbox/branches/1.8'
[ https://svn.apache.org/r1653981 ]

PDFBOX-2622: allow /BS as indirect object

> PDAnnotationLink::getBorderStyle() don't understand external border style
> -------------------------------------------------------------------------
>
>                 Key: PDFBOX-2622
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2622
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.8.8
>         Environment: Ubuntu 14.04, JRE 1.7
>            Reporter: Alexey Kulentsov
>         Attachments: eclipse_project.zip
>
>
> getBorderStyle() trying to get "BS" property and convert it to COSDictionary:
> {code}
>  COSDictionary bs = (COSDictionary) this.getDictionary().getItem(
>                 COSName.getPDFName( "BS" ) );
> {code}
> But it doesn't work when style is in external object and linked by reference 
> (see example attached in project zip):
> {quote}
> Exception in thread "main" java.lang.ClassCastException: 
> org.apache.pdfbox.cos.COSObject cannot be cast to 
> org.apache.pdfbox.cos.COSDictionary
>       at 
> org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationLink.getBorderStyle(PDAnnotationLink.java:131)
>       at org.accusoft.example.Bug.main(Bug.java:17)
> {quote}
>  I think it need something like conditional second getDictionary() here.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to