write_pdfa3u.json

Die JSON-Datei des Beispiels „Zählerstände in PDF/A-3u mit angehängter Tabelle“. Die Zählerstände eines Quartals, die ein Mensch auf der Seite liest und ein Abrechnungsprogramm aus der Tabelle in derselben Datei übernimmt.

JSON 54 Zeilen

Diese Datei ist eine Anfrage: Eine Anwendung sendet sie über das Netz an den Server, der das PDF erzeugt und zurücksendet. Sie erzeugt dieselbe Seite wie die Rust- und die Python-Fassung dieses Beispiels. Eine Anfrage nennt jede Datei, die sie verwendet, nie ihren Inhalt; der Aufruf trägt die Anfrage und die Dateien zusammen. Eine Schrift, die der Server bereits vorhält, etwa DejaVuSans, wird ohne Anhang genannt. Senden Sie die Anfrage an die Adresse, die die API-Seite angibt.

Diese Anfrage nennt Dateien, die sie nicht trägt: readings. Jede davon reist neben der Anfrage, im selben Aufruf, als mitgelieferter Teil, genau so benannt, wie die Anfrage sie hier nennt — die Beschreibung sagt, welcher Name welche Rolle spielt, Sie benennen Ihre Dateien also, wie Sie möchten. Eine Anfrage, die eine Datei nennt, von der der Aufruf nichts trägt, wird abgelehnt.

Wofür dieses Beispiel da ist

Die Zählerstände eines Quartals haben zwei Leser: einen Menschen, der die Zahlen auf der Seite prüft, und ein Abrechnungsprogramm, das dieselben Zahlen braucht, ohne dass jemand sie erneut eintippt. Zwei getrennte Dateien laufen auseinander, sobald eine davon zum ersten Mal korrigiert wird.

Was dieses Beispiel zeigt

 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
    }
  ]
}