write_pdfa3u.json

The JSON file of the “PDF/A-3u Meter Readings with Their Table Attached” example. A quarter's meter readings that a person reads on the page and a billing program takes from the table attached to the same file.

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: readings. 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 quarter's meter readings go to two readers: a person who checks the figures on the page, and a billing program that needs the same figures without anybody typing them in again. Two separate files drift apart the first time one of them is corrected.

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": "pdfa3u",
  "metadata": {
    "title": "Meter readings, first quarter 2026",
    "author": "HQF Development",
    "subject": "A record that carries the figures behind it and reads back word for word",
    "producer": "hqf-pdf-server",
    "created": "2026-04-05T07:30:00+02:00"
  },
  "attachments": [
    {
      "name": "readings",
      "file_name": "readings.csv",
      "media_type": "text/csv",
      "relationship": "data",
      "description": "The readings the page states, as a machine reads them",
      "modified": "2026-04-05T07:25:00+02:00"
    }
  ],
  "items": [
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 756, "urx": 523, "ury": 782},
      "content": ["Meter readings, first quarter 2026"],
      "font": "DejaVuSans",
      "font_size": 20
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 620, "urx": 523, "ury": 736},
      "content": ["This record claims the third part of the archival standard at the level between the plain one and the tagged one: it may carry a file of any kind, and every mark of ink on its pages says which letter it stands for. ", "The figures below are also carried inside the file, as the comma-separated table a machine reads. A person opens the record and reads the page; a program opens the same record and takes the figures without reading anything at all."],
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 16,
      "align": "justify"
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 540, "urx": 300, "ury": 596},
      "content": ["January\nFebruary\nMarch"],
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 17
    },
    {
      "type": "text",
      "rect": {"llx": 300, "lly": 540, "urx": 523, "ury": 596},
      "content": ["4 118 kWh\n3 902 kWh\n3 447 kWh"],
      "font": "DejaVuSans",
      "font_size": 11,
      "leading": 17
    }
  ]
}