You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Kai Keggenhoff <Ka...@thinkproject.com> on 2026/01/22 13:54:44 UTC
A question about "rotate" vs "rotation" in XFDF
Hi,
I'm a bit confused about attribute names in XFDF vs COS syntax.
For example, in FDFAnnotationFreeText.java the rotation of the annotation is taken from an attribute with the name "rotation".
But :
The current Foxit PDF SDK for Web uses "rotate" as the attribute name in its XFDF instead.
Some older versions of Adobe Acrobat also produced XFDF with "rotate".
However, some Adobe Readers (or programs identifying themselves as such) use "rotation".
Now I'm unsure about what is "the truth" here.
I don't have access to ISO 19444, which might explain everything related to XFDF, but I found this quote from pfda.org
"XFDF is the XML equivalent to FDF files, which are defined in clause 12.7.8 of ISO 32000-2.also
FDF files uses the same COS syntax that PDF files use."
and as the COS name for rotation is "Rotate" (at least for pages), I'd assume the attribute in XFDF should rather be "rotate" as well.
Then again, the PDF 2.0 spec only mentions "NoRotate" for annotations and that makes me wonder if annotations should have "rotate"/"rotation" attributes in the first place.
I know I can just parse my XFDF and look for any "rotate" and replace or duplicate it with a "rotation" attribute before I feed it into PDFBox.
But I cannot stop wondering if there is a definitive answer to the question what is the correct attribute name or if even both are "wrong".
If anyone with access to ISO 19444 would be so kind to shed some light on whether annotations, mainly of type FreeText, should or should not have a "rotate" or "rotation" attribute, I would be very thankful.
Sorry for the rambling,
Kai
[cid:9ce44e7a-b152-46ec-93fc-4746f516556b]<https://thinkproject.com/de/>
Kai Keggenhoff / Senior Software Developer
thinkproject.com<https://thinkproject.com/de> <https://thinkproject.com/de>
[cid:fdf1bbba-5521-41e7-a3f5-acc1e0e2ae74]<https://www.linkedin.com/company/thinkproject-dach/posts/?feedView=all>[cid:95814050-0959-4242-8dd3-6dc01db0cf40]<https://twitter.com/thinkproject_>
Read our legal information (imprint) here<https://thinkproject.com/de/impressum/>.
Re: A question about "rotate" vs "rotation" in XFDF
Posted by Kai Keggenhoff <Ka...@thinkproject.com>.
I did some more testing and found out that
Foxit 9.2.0 sends "rotation"
Adobe Reader (xfa:APIVersion="Acrobat:25.1.0") sends "rotation"
Foxit 11.0.5 sends "rotate"
I guess I'll write a nice email to Foxit and ask what they are up to here.
Kai
________________________________
From: Kai Keggenhoff <Ka...@thinkproject.com>
Sent: Thursday, January 22, 2026 14:54
To: users@pdfbox.apache.org <us...@pdfbox.apache.org>
Subject: A question about "rotate" vs "rotation" in XFDF
Hi, I'm a bit confused about attribute names in XFDF vs COS syntax. For example, in FDFAnnotationFreeText.java the rotat͏͏
[Graymail]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
Graymail<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
[Graymail]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
[External email]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
External email<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
[External email]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
[This email shows signs of impersonation]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
This email shows signs of impersonation<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
[This email shows signs of impersonation]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=69722c450c6220a620cf50ac&lang=en>
Hi,
I'm a bit confused about attribute names in XFDF vs COS syntax.
For example, in FDFAnnotationFreeText.java the rotation of the annotation is taken from an attribute with the name "rotation".
But :
The current Foxit PDF SDK for Web uses "rotate" as the attribute name in its XFDF instead.
Some older versions of Adobe Acrobat also produced XFDF with "rotate".
However, some Adobe Readers (or programs identifying themselves as such) use "rotation".
Now I'm unsure about what is "the truth" here.
I don't have access to ISO 19444, which might explain everything related to XFDF, but I found this quote from pfda.org
"XFDF is the XML equivalent to FDF files, which are defined in clause 12.7.8 of ISO 32000-2.also
FDF files uses the same COS syntax that PDF files use."
and as the COS name for rotation is "Rotate" (at least for pages), I'd assume the attribute in XFDF should rather be "rotate" as well.
Then again, the PDF 2.0 spec only mentions "NoRotate" for annotations and that makes me wonder if annotations should have "rotate"/"rotation" attributes in the first place.
I know I can just parse my XFDF and look for any "rotate" and replace or duplicate it with a "rotation" attribute before I feed it into PDFBox.
But I cannot stop wondering if there is a definitive answer to the question what is the correct attribute name or if even both are "wrong".
If anyone with access to ISO 19444 would be so kind to shed some light on whether annotations, mainly of type FreeText, should or should not have a "rotate" or "rotation" attribute, I would be very thankful.
Sorry for the rambling,
Kai
[cid:9ce44e7a-b152-46ec-93fc-4746f516556b]<https://thinkproject.com/de/>
Kai Keggenhoff / Senior Software Developer
thinkproject.com<https://thinkproject.com/de> <https://thinkproject.com/de>
[cid:fdf1bbba-5521-41e7-a3f5-acc1e0e2ae74]<https://links.eu1.defend.egress.com/Warning?crId=69722c450c6220a620cf50ac&Domain=thinkproject.com&Threat=eNpzrShJLcpLzAEADmkDRA%3D%3D&Lang=en&Base64Url=eNoNyDEOgDAIAMAXWXYT4y_cSYuhipQICfH3drjlOMJ8BcjMIl1val1LHQ9MhvpB8Fx7x0U1loaVwYaHw34StaNTbijyA7VrGrw%3D&@OriginalLink=www.linkedin.com>[cid:95814050-0959-4242-8dd3-6dc01db0cf40]<https://links.eu1.defend.egress.com/Warning?crId=69722c450c6220a620cf50ac&Domain=thinkproject.com&Threat=eNpzrShJLcpLzAEADmkDRA%3D%3D&Lang=en&Base64Url=eNrLKCkpKLbS1y8pzywpSS3SS87P1S_JyMzLLijKz0pNLokHANhoDO8%3D&@OriginalLink=twitter.com>
Read our legal information (imprint) here<https://thinkproject.com/de/impressum/>.
RE: A question about "rotate" vs "rotation" in XFDF
Posted by pe...@gmail.com.
It's unchanged in the 2019 edition of XFDF (ISO 19444-1) as "rotation".
From: Kai Keggenhoff <Ka...@thinkproject.com>
Sent: Friday, January 23, 2026 6:03 PM
To: users@pdfbox.apache.org
Subject: Re: A question about "rotate" vs "rotation" in XFDF
Thank you very much Tilman.
Foxit told me that'd need to look into why this was changed, but it's now clearly a problem with them.
I guess from now on, I'll have to preprocess the XFDF, because I have no idea how many records were (or will be) produced with "rotate" since we upgraded to Foxit 11.
Thanks again,
Kai
_____
From: Tilman Hausherr <THausherr@t-online.de <ma...@t-online.de> >
Sent: Thursday, January 22, 2026 15:42
To: users@pdfbox.apache.org <ma...@pdfbox.apache.org> <users@pdfbox.apache.org <ma...@pdfbox.apache.org> >
Subject: Re: A question about "rotate" vs "rotation" in XFDF
Am 22.01.2026 um 14:54 schrieb Kai Keggenhoff:
If anyone with access to ISO 19444 would be so kind to shed some light on whether annotations, mainly of type FreeText, should or should not have a "rotate" or "rotation" attribute, I would be very thankful.
I have only a 2007 specification and it's "rotation":
I didn't find anything in the PDF specification. Weird.
Tilman
Re: A question about "rotate" vs "rotation" in XFDF
Posted by Kai Keggenhoff <Ka...@thinkproject.com>.
Thank you very much Tilman.
Foxit told me that'd need to look into why this was changed, but it's now clearly a problem with them.
I guess from now on, I'll have to preprocess the XFDF, because I have no idea how many records were (or will be) produced with "rotate" since we upgraded to Foxit 11.
Thanks again,
Kai
________________________________
From: Tilman Hausherr <TH...@t-online.de>
Sent: Thursday, January 22, 2026 15:42
To: users@pdfbox.apache.org <us...@pdfbox.apache.org>
Subject: Re: A question about "rotate" vs "rotation" in XFDF
Am 22.01.2026 um 14:54 schrieb Kai Keggenhoff: If anyone with access to ISO 19444 would be so kind to shed some light on͏͏
[External email]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=697237635f69918881bcfd4a&lang=en>
External email<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=697237635f69918881bcfd4a&lang=en>
[External email]<https://summary.eu1.defend.egress.com/v3/summary?ref=email&crId=697237635f69918881bcfd4a&lang=en>
Am 22.01.2026 um 14:54 schrieb Kai Keggenhoff:
If anyone with access to ISO 19444 would be so kind to shed some light on whether annotations, mainly of type FreeText, should or should not have a "rotate" or "rotation" attribute, I would be very thankful.
I have only a 2007 specification and it's "rotation":
[cid:part1.nJqX0uiY.0Ildwxkc@t-online.de]
I didn't find anything in the PDF specification. Weird.
Tilman
Re: A question about "rotate" vs "rotation" in XFDF
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 22.01.2026 um 14:54 schrieb Kai Keggenhoff:
>
> If anyone with access to ISO 19444 would be so kind to shed some light
> on whether annotations, mainly of type FreeText, should or should not
> have a "rotate" or "rotation" attribute, I would be very thankful.
I have only a 2007 specification and it's "rotation":
I didn't find anything in the PDF specification. Weird.
Tilman