Code 128 and Retail Barcodes
Stripes for the two jobs that want them: Code 128 for any text at all, and the three a till reads — EAN-13, UPC-A, EAN-8 — each with its last digit worked out rather than typed.
Data Matrix is what industry marks small parts with. It stays readable at sizes where a QR code has given up, and its rectangular shapes go onto components and labels that have no room for a square: a circuit board, a surgical instrument, a phial in a laboratory tray.
Choose Data Matrix when the room is tiny and what reads it is a machine rather than a person. It stays readable at sizes where a QR code has given up, and it goes down as a rectangle where a square will not fit — a strip along the edge of a board, a band round a phial. It is the code of factories, laboratories and hospitals rather than of customers: nobody points a telephone at one. Its size is not settled in advance either. It grows only as far as the text inside it needs, so a short reference comes out smaller than a long web address, and the page below shows both.
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
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
Stripes for the two jobs that want them: Code 128 for any text at all, and the three a till reads — EAN-13, UPC-A, EAN-8 — each with its last digit worked out rather than typed.
The code an invoice, a boarding pass or a label ends up wanting, drawn into the document rather than fetched as a picture and pasted in.
The code on identity documents and shipping papers: it carries far more text than a row of bars, and it survives a laser scanner dragged across it.
The code on rail and airline tickets, and the reason is room: it needs no band of white around it, which is the first thing trimmed off a layout that has run tight.
Nine codes whose bytes say which character set they are written in, so Greek comes back as Greek and Cyrillic as Cyrillic, whatever set the scanner would have fallen back on.
Nine barcodes from the workshop, the warehouse, the till, the blood bank and the book trade, each printed above the text a scanner reads back from it.