write_pdfa2a.json

The JSON file of the “A Tagged PDF/A-2a Notice of Rate Change” example. A notice written to the second part of the archival standard at its highest level, which software reading aloud follows in the order the text is meant to be read in.

JSON 82 lines

This file is a request: an application sends it over the network to the server, which creates the PDF and sends it back. It creates the same page as the Rust and Python versions of this example. A request names every file it uses, never its content; the call carries the request and the files together. A font the server already holds, such as DejaVuSans, is named with nothing attached. Send the request to the address the API page gives.

What This Example Is For

A notice of a new rate has to reach every customer, including the ones who read with software that speaks the page aloud, and a public body may also have to keep it for years. One file has to do both: last, and be read in the right order.

What This Example Shows

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
  "archive": "pdfa2a",
  "metadata": {
    "title": "Notice of rate change, April 2026",
    "author": "HQF Development",
    "subject": "A record that says what it is made of, and keeps its looks for good",
    "producer": "hqf-pdf-server",
    "created": "2026-04-02T08:00:00+02:00"
  },
  "structure": {
    "lang": "en-GB",
    "children": [
      {
        "tag": "Document",
        "children": [
          {
            "tag": "Sect",
            "children": [
              {"tag": "H1", "content": "heading"},
              {"tag": "P", "content": "body"},
              {"tag": "P", "content": "closing"}
            ]
          }
        ]
      }
    ]
  },
  "items": [
    {
      "type": "flow",
      "rect": {"llx": 72, "lly": 750, "urx": 523, "ury": 782},
      "content": "Notice of rate change",
      "font": "DejaVuSans",
      "font_size": 20,
      "first_baseline": {"points": 0},
      "tag": "H1",
      "mark": "heading",
      "pages": [1]
    },
    {
      "type": "flow",
      "rect": {"llx": 72, "lly": 600, "urx": 523, "ury": 730},
      "content": "This notice claims the second part of the archival standard at its highest level. On top of the promise that the page keeps its looks, and on top of every mark of ink saying which letter it stands for, the file says what it is made of: this line is a heading, that block is a paragraph, and the rule across the foot is furniture that says nothing at all.\nSomething reading the notice aloud follows the order the tree gives rather than the order the ink was laid down in, and reading software on a telephone has something to reflow.",
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 16,
      "first_baseline": {"points": 0},
      "tag": "P",
      "mark": "body",
      "pages": [1]
    },
    {
      "type": "flow",
      "rect": {"llx": 72, "lly": 540, "urx": 523, "ury": 580},
      "content": "The new rate applies to every order acknowledged on or after 1 May 2026. Orders already acknowledged stand at the rate they were acknowledged at.",
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 16,
      "first_baseline": {"points": 0},
      "tag": "P",
      "mark": "closing",
      "pages": [1]
    },
    {
      "type": "rect",
      "rect": {"llx": 72, "lly": 70, "urx": 523, "ury": 71},
      "fill": [0, 0, 0],
      "artifact": "footer",
      "pages": [1]
    },
    {
      "type": "flow",
      "rect": {"llx": 72, "lly": 56, "urx": 523, "ury": 68},
      "content": "Page 1 of 1",
      "font": "DejaVuSans",
      "font_size": 9,
      "first_baseline": {"points": 0},
      "artifact": "footer",
      "pages": [1]
    }
  ]
}