How the Pieces Fit Together

Three ways to reach the same engine. Between two boxes there are always two arrows: the first says what is asked for, the second says what comes back.

1. The customer goes through us

The customer creates their document in a page of this site and gets the finished PDF back. They install nothing and they write no program: everything between the editor and the created pages runs here.

  1. The customer in the customer's web browser
  2. The online editor a page of this site: create an account and it is yours to use
  3. The site runs at HQF Development
  4. The server runs at HQF Development
  5. The Library inside the server

What the customer pays for: a subscription, by the month.

2. The Customer Bought the Server and the Library

The customer writes the JSON themselves and sends it to the server running at their place. There is no editor and no site in front of it: the chain starts in their own program and never leaves their machines.

  1. The customer's own program runs at the customer's
  2. The server runs at the customer's
  3. The Library inside the server

What the customer pays for: the server and the library, bought outright.

3. The Library on Its Own

A development team writes Rust or Python and calls the library straight from their program. No JSON travels anywhere, and there is no server: the library is part of what they built.

  1. A development team writes Rust or Python
  2. The Library inside the program they wrote

What the customer pays for: the library, bought outright.

The same document, asked for three ways: what differs, and why

Rust and Python are the same code. The module a Python program calls is a thin skin over the library itself, so there is nothing between the two that could differ, and nothing does: every document published here comes out of the two byte for byte identical. The third way is not a call at all. It is a description sent over the network, which the server reads and lays out itself — and that is where the bytes part company.

  • Every worked example on this site is written twice over, once in Rust and once in Python. Run both, and what comes out is rigorously the same file. 908 finished documents are held to that, and held to it again every time anything changes.
  • 120 of those documents are asked for a third way as well, as a request sent to the server over the network. For 6 of them, what comes back is rigorously the same file again.
  • For the other 114, what comes back is the same document to the eye: every page matches dot for dot, and the text you can select and copy is the same word for word. The files themselves differ, and only because the two ways of asking write the same drawing instructions in a different order.
  • Each of those pairs carries a file of its own saying which of the two it holds to, and why it cannot hold to the stricter one. Every difference is named and explained.

What Differs

  • A worked example calls the library by hand: it names the font, then the point the line starts at, and shows the whole line in one show-text operator. A block of text described over the network names its point first, then its colour, and shows a word at a time — because the server is the one breaking the line and spacing the words, and it has to be free to put each word where the break puts it.
  • A rectangle the library strokes is one rectangle operator. The same rectangle described over the network is its four corners walked as a closed path.
  • A row of dashes the library strokes is one path. Described over the network, each dash is an item of its own.

What Is Held to What

In all three, the ink lands on the same points. What is compared is not the wording of the instructions but what they draw: both files are rendered page by page and compared with each other dot for dot, both are held to the fonts their pages actually draw with, and every word is held to the box it occupies.

What that comparison does not read: the bytes of a stream, an object no page shows, and a difference in ink too small to move a dot. A pair held to the picture rather than to the bytes carries a file of its own, published beside its request, naming what stands between it and the stricter agreement.