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

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

Commit 1929965 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1929965 ]

PDFBOX-6104: fix border style initialization + add test, by Kai Keggenhoff

> border style in FDFAnnotation is not initialized if width is 0
> --------------------------------------------------------------
>
>                 Key: PDFBOX-6104
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6104
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.35, 3.0.6 PDFBox
>            Reporter: Kai Keggenhoff
>            Priority: Major
>             Fix For: 2.0.36, 3.0.7 PDFBox, 4.0.0
>
>         Attachments: FDFAnnotationWidthTestPDFBox2.java, 
> FDFAnnotationWidthTestPDFBox3.java
>
>
> The FDFAnnotation(Element) constructor reads the border style attributes from 
> the XFDF, but only initializes the object's border style field if the width 
> is greater that 0.
> If the width is 0, the border style field is not initialized and 
> subsequently, when the FDFAnnotation's COSObject is used to create a 
> PDAnnotation, its width defaults to 1, which is not the value from the XFDF.
> Suggestion : move the statement
> setBorderStyle(borderStyle);
> (line 306 in PDFBox 3.0.6, line 313 in 2.0.35) just outside the block it 
> currently resides in, so the border style is always initialized in the 
> FDFAnnotation object.
> Attached are two tests to adapt to your needs and standards.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to