write_eval_watermark.json

The JSON file of the “The watermark a trial copy carries” example. What you get before you pay anything: a watermark across every page, and the same pages under it, laid out exactly as a paid copy lays them out. This is also the document that says what a licence key changes, and why every figure on this site is measured with one.

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

This is one of the two pairs on the site rendered without a licence key, because that is what the example itself shows. A trial copy traces every letter rather than writing it as text, so what the two files carry is the shape of every word rather than the word itself — on either side. What the two must do is match dot for dot, watermark included. The library also writes each of the six lines at a stated height, where the request gives each one a rectangle and lets the line sit one line's height under the top of it.

What this example is for

You want to see what this engine makes before you pay anybody anything. A trial copy lays out the same pages as a paid copy — the same layout, the same tables, the same tables carried on to the next page, the same files made for keeping — and writes a watermark corner to corner across every page. Look at the picture beside this text before you open anything: the watermark climbs across the page, a smaller line under it says what a licence key buys, and underneath sits an ordinary report — a heading, a name, two sentences — laid out exactly as a paid copy lays it. The document below is that trial copy, exactly as it came out.

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
83
84
85
86
87
88
{
  "items": [
    {
      "type": "text",
      "rect": {
        "llx": 72.0,
        "lly": 760.0,
        "urx": 540.0,
        "ury": 784.0
      },
      "content": [
        "Quarterly report"
      ],
      "font": "DejaVuSans",
      "font_size": 20.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 72.0,
        "lly": 730.0,
        "urx": 540.0,
        "ury": 743.2
      },
      "content": [
        "Prepared for HQF Development"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 72.0,
        "lly": 700.0,
        "urx": 540.0,
        "ury": 713.2
      },
      "content": [
        "Revenue held steady across the three months, and costs fell as the new"
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 72.0,
        "lly": 684.0,
        "urx": 540.0,
        "ury": 697.2
      },
      "content": [
        "rendering pipeline replaced the tools it was built to retire."
      ],
      "font": "DejaVuSans",
      "font_size": 11.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 72.0,
        "lly": 120.0,
        "urx": 540.0,
        "ury": 132.0
      },
      "content": [
        "This is an evaluation copy: the library stamps every page with the"
      ],
      "font": "DejaVuSans",
      "font_size": 10.0
    },
    {
      "type": "text",
      "rect": {
        "llx": 72.0,
        "lly": 106.0,
        "urx": 540.0,
        "ury": 118.0
      },
      "content": [
        "watermark above until a licence key is set. Set one and it is gone."
      ],
      "font": "DejaVuSans",
      "font_size": 10.0
    }
  ]
}