Reference

Barcodes that still scan once they are on paper

This API renders HTML to PDF and does not generate barcodes. The symbol comes from an encoder in your own stack, as SVG or as a data URI, and goes into your markup like any other generated graphic. These pages are about the other half: getting it onto paper in a state a scanner will accept.

That half is where the failures are. The encoders are mature and correct, and a code that will not scan has almost always lost its quiet zone, been sized as a percentage of something, or been rasterised and resampled at print resolution. For the label these usually end up on, see the 4 by 6 label size, and for a complete document with a code in it, the ticket template.

Linear (1D)

  • Code 128Quiet zone: 10 times the X-dimension at each end

    The general-purpose linear barcode: full ASCII, any length, and the densest of the common linear symbologies for numeric data.

  • GS1-128Quiet zone: 10 times the X-dimension at each end

    Code 128 with a data structure on top: a function character marks the symbol as GS1, and the content is a sequence of Application Identifiers.

  • EAN-13Quiet zone: Asymmetric

    The retail barcode used everywhere outside North America: thirteen digits, a fixed size range, and an asymmetric quiet zone.

  • UPC-AQuiet zone: 9 times the X-dimension at each end

    The North American retail barcode: twelve digits, and technically a subset of EAN-13 with a leading zero.

  • ITF-14Quiet zone: 10 times the X-dimension at each end

    The barcode printed on shipping cases: fourteen digits, deliberately coarse, and framed by bearer bars that exist to prevent misreads.

  • Code 39Quiet zone: 10 times the X-dimension at each end

    The old alphanumeric workhorse: uppercase letters and digits, no mandatory check digit, and considerably wider than the alternatives.

  • Code 93Quiet zone: 10 times the X-dimension at each end

    Code 39 made denser and stricter: the same character set in about three quarters of the width, with two check characters that are not optional.

  • CodabarQuiet zone: 10 times the X-dimension at each end

    An old numeric symbology with no check digit of its own and four different start and stop characters, which are chosen by the application rather than by the data.

  • EAN-8Quiet zone: 7 times the X-dimension at both ends

    The short retail barcode for packs too small to carry EAN-13: eight digits, a symmetric quiet zone, and a number you have to be granted rather than derive.

  • UPC-EQuiet zone: 9 times the X-dimension leading and 7 times trailing

    A UPC-A with its zeros squeezed out: six digits printed, twelve digits transmitted, and a check digit that is carried in the parity pattern rather than in bars of its own.

Stacked linear

  • PDF417Quiet zone: 2 modules on all four sides

    A stack of short linear rows rather than a matrix: high capacity, a wide flat shape, and the symbology behind driving licences and boarding passes.

2D matrix

  • QR CodeQuiet zone: 4 modules on all four sides

    The 2D code everyone recognises: read by any phone, generous error correction, and a quiet zone four modules wide that almost nobody leaves.

  • Data MatrixQuiet zone: 1 module on all four sides

    The small-format 2D code: a one module quiet zone, an L-shaped finder, and the symbology of choice when there is almost no room.

  • Aztec CodeQuiet zone: None required

    The 2D code that needs no quiet zone at all, with a bullseye finder in the middle, used across European rail ticketing.

  • MaxiCodeQuiet zone: 1

    The one symbology on this list with no size to choose: 884 hexagons around a bullseye, always 28.14 by 26.91mm, printed at that size or not at all.