[
https://issues.apache.org/jira/browse/PDFBOX-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr resolved PDFBOX-2622.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
1.8.9
Assignee: Tilman Hausherr
A snapshot should be available within a few hours here:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox/1.8.9-SNAPSHOT/
Thanks for the report, the research and the help!
> 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, 1.8.9, 2.0.0
> Environment: Ubuntu 14.04, JRE 1.7
> Reporter: Alexey Kulentsov
> Assignee: Tilman Hausherr
> Fix For: 1.8.9, 2.0.0
>
> 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)