Hi,
Yes you're right, please create a ticket. If possible, add test files.
Tilman
Am 24.11.2025 um 15:22 schrieb Kai Keggenhoff:
Hi everyone.
We are importing annotations in XFDF format via PDFBox into PDF documents.
We observed a discrepancy for text annotations exported from Foxit and
imported into a PDF when viewed with Adobe Reader regarding the border
of such annotations.
When I look at the code of the FDFAnnotation(Element element)
constructor, the "width" attribute is parsed and its value set in the
newly created PDBorderStyleDictionary object. (lines 258-262 in
2.0.35, lines 254-258 in 3.0.6).
A sample annotation in XFDF starts like this
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<annots>
<freetext
width="0.00"
justification="left"
...
In this case, the parsed value for "width" is "0" and set in the
border style object.
Next, this value is read and compared to ">0" to update border style,
effect, dashes and so forth.
However, the border style is only updated in the annotation object
when the border width is ">0".
So I'm taking a guess here, but I think the line
setBorderStyle(borderStyle);
should be outside of the ">0" block so that the border is always set
and the width doesn't default to "1" when that FDFAnnotation is used
to produce a PDAnnotation.
Please let me know if I should raise an issue in JIRA for this.
Thanks in advance,
Kai
<https://thinkproject.com/de/>
*Kai Keggenhoff* / Senior Software Developer
*thinkproject.com
<https://thinkproject.com/de>**<https://thinkproject.com/de>*
<https://www.linkedin.com/company/thinkproject-dach/posts/?feedView=all><https://twitter.com/thinkproject_>
Read our legal information (imprint) here
<https://thinkproject.com/de/impressum/>.