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
Open the document in German
Open the document in Spanish
Open the document in Italian
Open the document in Portuguese