Three statements in one file

A print shop receives one PDF of four pages. Nothing drawn on them says that it holds three customer statements rather than one long one, nor that the first customer is owed two copies and the third three. That usually arrives in a job ticket beside the file, and the day the ticket and the file stop agreeing, the wrong statement goes into the wrong envelope.

Here the file says it itself, where a press reads it and ordinary reading software ignores it. On a screen it is one document of four pages; on a press it is three jobs, each carrying its own instructions and its own attachment. The first statement runs to two pages, its terms of payment following it, and the other two are a page each. Nothing travels alongside the file any more, so there is nothing left to fall out of step with it.

What this example shows

  • Three statements in one file, each claiming the pages it runs to.
  • Who a statement is for, its town, and how many copies are owed.
  • An attachment per statement, belonging to it rather than to the file.

The source code, complete

Nothing is left out and nothing is simplified: this is the program exactly as it runs, for the developer who uses this library. The third is the description itself: a plain list of what the page has to say, which is what the service is sent.

Read the Rust source Read the Python source Read the JSON source

The document itself

Open the document in English Open the document in French

Examples near this one

A commercial invoice

An invoice whose lines and totals fall where the text puts them, and whose QR code lets a telephone pay the exact sum into the exact account with nothing retyped.

A delivery note

The note that travels with the goods: a barcode against each article, a box the receiver ticks, and the consignment's own code.

A payslip

A payslip: eighteen contribution lines with employee and employer shares, the month against the year to date.

A landscape certificate

A certificate whose border, ribbon and seal are drawn as lines rather than photographed: sharp at any size, and a fraction of the weight.

A boarding pass

A boarding pass carrying, as a QR code, the one line the gates at an airport read — one character out of place and it is refused.

Every example, by subject