A boarding pass

A boarding pass is read by a machine at a gate, by a person at a desk, and by a passenger holding a bag in the other hand. All three have to find what they need on the same small rectangle, in a second, which is why the layout is as tight and as boxed as it is. The one that matters most is the machine, and it is the least forgiving of the three.

The QR code is not decoration. It carries the one line the boarding gates of the world agreed to read: the name, the booking reference, the two airports, the airline, the flight, the day of the year, the class, the seat, the check-in number and the passenger's standing — each in its own place, each of a fixed width, padded with blanks when it falls short. One character out of place and the gate does not argue, it simply refuses the pass.

What this example shows

  • The one line the gates read, each detail written at the place set aside for it.
  • That string carried as a QR code, the way a boarding pass on a phone carries it.
  • A perforation rule and a stub that repeats the flight details.

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