A commercial invoice

An invoice is the document a business gets paid on. It also never has the same shape twice: four lines this month, forty the next, and the totals have to land under them either way. Nothing here sits at a height somebody measured beforehand — each line takes the room it needs as it is written, and the page turns by itself when there is none left.

The payment block is where money goes astray. An account number is twenty-seven characters long, and somebody is copying them off a screen into a bank form. Here a telephone reads the QR code instead and offers to pay that exact sum — seventeen thousand eight hundred and eighty euros — into that exact account, with nothing left to retype and nothing left to mistype. The code is drawn into the page at the size it prints, and, before a change enters the library, a decoder reads it back off the finished page.

What this example shows

  • A letterhead, a logo and the two addresses, placed to the point.
  • Four billed lines under one heading, and the totals following them.
  • A QR code a banking application reads to pay the exact sum into the exact account.

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

A sheet of shelf labels

Fifteen shelf labels on one pre-cut sheet, each with its price and its scannable code, and trim marks in the margins. Six numbers describe the paper.

Every example, by subject