XFDF is the XML format for PDF annotations, standardised as ISO 19444-1. Gloss carries the same annotations as JSON. This page lists the Gloss type for each XFDF element and the Gloss field for each XFDF attribute, generated from the names the schema records, so it matches v1.json.
Every element takes these. The element name gives the Gloss type.
| XFDF |
Gloss |
Notes |
coords |
quads |
|
| XFDF |
Gloss |
Notes |
coords |
quads |
|
| XFDF |
Gloss |
Notes |
coords |
quads |
|
| XFDF |
Gloss |
Notes |
coords |
quads |
|
| XFDF |
Gloss |
Notes |
icon |
icon |
The icon a note shows on the page (XFDF icon, PDF /Name). |
| XFDF |
Gloss |
Notes |
width |
width |
|
dashes |
dashes |
A dash pattern in points: lengths on, then off, repeating (XFDF dashes, PDF /D). |
| none |
cornerRadius |
XFDF has no attribute for it. |
defaultstyle |
defaultStyle |
The keys are the CSS property names XFDF writes in its defaultstyle string, in camel case. |
fringe |
fringe |
Insets from an annotation’s rect to the area it draws in, in points (PDF /RD, XFDF fringe, both in this order). |
callout |
callout |
|
head |
head |
The shape drawn at the end of a line (XFDF head and tail, PDF /LE). |
| XFDF |
Gloss |
Notes |
width |
width |
|
dashes |
dashes |
A dash pattern in points: lengths on, then off, repeating (XFDF dashes, PDF /D). |
interior-color |
interiorColor |
|
| none |
cornerRadius |
XFDF has no attribute for it. |
| XFDF |
Gloss |
Notes |
width |
width |
|
dashes |
dashes |
A dash pattern in points: lengths on, then off, repeating (XFDF dashes, PDF /D). |
interior-color |
interiorColor |
|
| XFDF |
Gloss |
Notes |
start |
start |
|
end |
end |
|
width |
width |
|
dashes |
dashes |
A dash pattern in points: lengths on, then off, repeating (XFDF dashes, PDF /D). |
head |
head |
The shape drawn at the end of a line (XFDF head and tail, PDF /LE). |
tail |
tail |
The shape drawn at the end of a line (XFDF head and tail, PDF /LE). |
| XFDF |
Gloss |
Notes |
vertices |
vertices |
|
width |
width |
|
dashes |
dashes |
A dash pattern in points: lengths on, then off, repeating (XFDF dashes, PDF /D). |
interior-color |
interiorColor |
|
head |
head |
The shape drawn at the end of a line (XFDF head and tail, PDF /LE). |
tail |
tail |
The shape drawn at the end of a line (XFDF head and tail, PDF /LE). |
| XFDF |
Gloss |
Notes |
vertices |
vertices |
|
width |
width |
|
dashes |
dashes |
A dash pattern in points: lengths on, then off, repeating (XFDF dashes, PDF /D). |
interior-color |
interiorColor |
|
| XFDF |
Gloss |
Notes |
inklist |
inklist |
|
width |
width |
|
dashes |
dashes |
A dash pattern in points: lengths on, then off, repeating (XFDF dashes, PDF /D). |
The XFDF <fields> element holds the values of the form fields. Gloss writes them in the document’s fields property: an object keyed by full dotted field name, in place of one <field> element per name. XFDF nests <field> elements for a field hierarchy; Gloss joins the nested names with ., so a <field name="b"> inside <field name="a"> becomes "a.b". A field that is absent from fields differs from one set to an empty string: absent means no value is carried, while an empty string clears the field. A string fills a text, checkbox, radio, combo or single-select list field. An array of strings fills a multi-select list. An object with a signature key names a signature annotation in the same document.
| XFDF |
Gloss |
<field name="a.b"><value>x</value></field> |
"a.b": "x" |
<field name="c"><value>x</value><value>y</value></field> |
"c": ["x", "y"] |
See Fields, FieldValue and SignatureFieldValue.