Alexey Kulentsov created PDFBOX-2622:
----------------------------------------

             Summary: 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


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 getDictionary() here.




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

Reply via email to