Skip to content

Document

A Gloss document: the annotations on one PDF and, optionally, the values of its form fields.

{
"$ref": "https://gloss-format.org/schema/v1.json#/$defs/Document"
}

Required fields are bracketed.

Field Type Default XFDF Description
format (required) string; always "gloss" — Marks the file as Gloss. Always gloss.
version (required) number; always 1 — The Gloss format version the document follows. Always 1 for this schema.
documentKey string — Optional. Identifies the PDF the annotations belong to, in whatever form the writer and reader agree on.
annotations (required) (Annotation or UnknownAnnotation)[] — The annotations, in drawing order. Each is a type Gloss defines or one it doesn’t.
fields Fields fields Optional. The values of the PDF form fields, keyed by full dotted field name. It maps to the fields element of XFDF.
{
"format": "gloss",
"version": 1,
"annotations": [
{
"type": "highlight",
"id": "a1",
"page": 0,
"rect": {
"x": 72,
"y": 700,
"width": 120,
"height": 14
},
"quads": [
{
"p1": {
"x": 72,
"y": 714
},
"p2": {
"x": 192,
"y": 714
},
"p3": {
"x": 72,
"y": 700
},
"p4": {
"x": 192,
"y": 700
}
}
]
}
]
}
{
"format": "gloss",
"version": 1,
"annotations": [],
"fields": {
"applicant.name": "Ada",
"interests": [
"maths",
"engines"
]
}
}

From the creators of Inkbar and Redactr.

Format version 1 · gloss-format 1.3.0