write_pdfa4f.json

The JSON file of the “A PDF/A-4f Statement with Its Data Attached” example. A statement of account on the fourth part of the archival standard, carrying the same figures as an XML file a program reads without anybody retyping them.

JSON 54 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.

This request names files it does not carry: statement. Each one travels beside the request, in the same call, as a supplied part named exactly as the request names it here — the description says which name plays which role, so you name your files as you like. A request naming a file the call carries nothing of is refused.

What This Example Is For

A statement of account is checked by a person and booked by a program. When the figures exist only on the page, somebody types them into the accounts, and a figure typed is a figure that can be typed wrong.

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
{
  "archive": "pdfa4f",
  "metadata": {
    "title": "Statement of account, May 2026",
    "author": "HQF Development",
    "subject": "A record on the second version of PDF, carrying the figures a machine reads",
    "producer": "hqf-pdf-server",
    "created": "2026-06-02T08:15:00+02:00"
  },
  "attachments": [
    {
      "name": "statement",
      "file_name": "statement.xml",
      "media_type": "text/xml",
      "relationship": "alternative",
      "description": "The lines this page states, as a machine reads them",
      "modified": "2026-06-02T08:10:00+02:00"
    }
  ],
  "items": [
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 756, "urx": 523, "ury": 782},
      "content": ["Statement of account, May 2026"],
      "font": "DejaVuSans",
      "font_size": 20
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 640, "urx": 523, "ury": 736},
      "content": ["This record claims the fourth part of the archival standard at the level that carries files. The part it is built on takes a file of any kind, whatever the file itself conforms to, so the same record answers a person and a program. ", "The lines below are carried inside the file as well, in the form a machine reads."],
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 16,
      "align": "justify"
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 560, "urx": 300, "ury": 616},
      "content": ["Carriage\nHandling\nDue"],
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 17
    },
    {
      "type": "text",
      "rect": {"llx": 300, "lly": 560, "urx": 523, "ury": 616},
      "content": ["1 240.00\n186.50\n1 426.50"],
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 17
    }
  ]
}