Kai Keggenhoff created PDFBOX-6104:
--------------------------------------

             Summary: 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: 3.0.6 PDFBox, 2.0.35
            Reporter: Kai Keggenhoff
         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