write_pdf417.json

The JSON file of the “PDF417 codes” example. The code on identity documents and shipping papers: it carries far more text than a row of bars, and it survives a laser scanner dragged across it.

JSON 79 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 makes 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

PDF417 is the code on identity documents, transport tickets and shipping papers. It carries far more text than a row of bars can, and it survives a laser scanner dragged across it rather than a camera held still — which is what a counter clerk and a loading bay actually have in their hands.

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
{
  "metadata": {
    "title": "PDF417 codes, drawn as stacked bars"
  },
  "items": [
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 794, "urx": 523.276, "ury": 813.2},
      "content": [
        "PDF417 codes, drawn as stacked bars"
      ],
      "font": "DejaVuSans",
      "font_size": 16
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 770, "urx": 523.276, "ury": 782.6},
      "content": [
        "A PDF417 code is rows of bars stacked one over another, and it holds a whole"
      ],
      "font": "DejaVuSans",
      "font_size": 10.5
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 755, "urx": 523.276, "ury": 767.6},
      "content": [
        "form rather than a number. Under each one is what a scanner reads back."
      ],
      "font": "DejaVuSans",
      "font_size": 10.5
    },
    {
      "type": "pdf417",
      "content": "https://example.test/track/FR-1964413",
      "columns": 4,
      "level": 2,
      "rect": {"llx": 72, "lly": 651, "urx": 283.5, "ury": 709.5}
    },
    {
      "type": "text",
      "rect": {"llx": 75, "lly": 600, "urx": 275, "ury": 656},
      "content": ["https://example.test/track/FR-1964413"],
      "font": "DejaVuSans",
      "font_size": 8,
      "leading": 8
    },
    {
      "type": "pdf417",
      "content": "SN:2026-07-19/ACME-4472",
      "columns": 4,
      "level": 2,
      "rect": {"llx": 72, "lly": 568.5, "urx": 283.5, "ury": 613.5}
    },
    {
      "type": "text",
      "rect": {"llx": 75, "lly": 520, "urx": 275, "ury": 573.5},
      "content": ["SN:2026-07-19/ACME-4472"],
      "font": "DejaVuSans",
      "font_size": 8,
      "leading": 8
    },
    {
      "type": "pdf417",
      "content": "a-Z 0..9 +*#% and on",
      "columns": 4,
      "level": 2,
      "rect": {"llx": 72, "lly": 499.5, "urx": 283.5, "ury": 544.5}
    },
    {
      "type": "text",
      "rect": {"llx": 75, "lly": 450, "urx": 275, "ury": 504.5},
      "content": ["a-Z 0..9 +*#% and on"],
      "font": "DejaVuSans",
      "font_size": 8,
      "leading": 8
    }
  ]
}