Barcodes and QR codes in print files: getting them to scan on paper
A QR code that scans on a phone screen can fail on the printed page for reasons that have nothing to do with the code itself. It was placed too small, it lost its quiet zone to a design element, it was printed in a colour with too little contrast, or a JPEG export blurred the modules until the reader gave up. Barcodes for retail packaging are less forgiving still, because a scanner at a checkout reads them in a fraction of a second under bad light, and the retailer will refuse a product whose code does not read. This guide covers the sizes, colours, file formats and test routine that keep codes readable once they leave the screen.
QR codes: minimum size and error correction
A QR code's readability depends on the size of its smallest square, called a module, not on the overall size of the code. A short URL with few characters produces a 25 x 25 module code; a long tracking URL with parameters can produce 45 x 45 or more. At the same printed size, the long code has modules half as big and is much harder to scan from a distance.
Working rules that hold up in practice:
- For a code scanned from a hand-held distance (flyer, business card, menu): printed size at least 20 mm square, and shorten the URL first so the code stays around 25 to 29 modules.
- For a poster scanned from a metre away: roughly one tenth of the scan distance, so 100 mm for a code read from 1 m. A code on a shop window read from the pavement needs 150 mm or more.
- Error correction: choose level M (15 percent) for plain codes and level H (30 percent) only if you are putting a logo in the middle. Higher correction adds modules and makes the code denser, so do not pick H by default.
- Quiet zone: four modules of clear space on every side. Designers routinely butt a code against a border or a background photo; this is the most common cause of a code that "sometimes" scans.
Generate the code from the final URL, not a draft. If the destination might change, point the code at a short redirect link you control, so the printed code keeps working after the campaign page moves. The article on variable data printing explains how to give every printed piece its own unique code when you need per-customer tracking.
Colour and contrast
Scanners read the difference between dark modules and a light background. Black on white is safe. Dark navy on cream is fine. A brand-coloured code has to keep the dark modules genuinely dark: as a rough guide the dark colour should have a luminance below 30 percent and the background above 70 percent. Reversed codes (light modules on a dark background) fail on many readers; avoid them, or test on at least three phones before you commit.
Two production issues affect contrast on paper. Dot gain on uncoated stock makes each module spread slightly and can close the white gaps in a dense code; a code printed at the minimum size on uncoated paper needs to be 20 to 30 percent larger than the same code on coated stock. Gloss lamination reflects the phone's torch and can wash out the code at some angles; matte lamination over a code is safer.
Retail barcodes: EAN-13 and UPC
Retail barcodes are specified by GS1 and retailers check them with verifiers, not phones. The rules are strict and worth following exactly.
| Item | Specification | Practical note |
|---|---|---|
| Nominal size (EAN-13) | 37.29 x 25.93 mm at 100 percent | Allowed from 80 to 200 percent; below 80 percent is rejected |
| Bar colour | Black, dark blue, dark green | Never red, orange or yellow; scanners use red light and see them as white |
| Background | White or very light, matte | Metallic and transparent substrates need a printed white panel |
| Quiet zones | Left 3.63 mm, right 2.31 mm at 100 percent | Print the light-guard marks (< and >) to protect them |
| Truncation | Keep full height | A shortened bar height fails omnidirectional scanners |
| Bar width reduction | Set by the print process | Flexo and uncoated need BWR; ask the printer, do not guess |
Barcodes must be vector. A barcode pasted as a JPEG from a free website has anti-aliased edges that verifiers read as inconsistent bar widths. Generate an EPS, SVG or PDF from a proper barcode tool or from GS1, and place it at 100 percent or scale it uniformly. Never stretch a barcode in one direction only.
File format and placement
For both QR and retail codes, the safest handling in the artwork is the same:
- Place the code as a vector object, or as a PNG at 600 ppi or more if vector is not available. Never JPEG; the compression blurs the module edges.
- Keep it in 100 percent black (K only), not rich black. Registration error across four plates blurs a four-colour code.
- Do not apply effects: no drop shadow, no transparency, no overprint. A 0.5 mm misregistration under a shadow is enough to close a module gap.
- Keep the code 5 mm from any trim, fold or score. A crease through a barcode can drop its scan rate to near zero.
- Do not rotate a retail barcode unless the print direction requires it; bars should run in the same direction the paper travels through the press so any slur affects bar length rather than bar width.
The general rules for vector versus raster elements are covered in our vector or raster file guide; codes are the one place where getting this wrong is invisible on screen and fatal on paper.
Testing before and after printing
Before uploading: print the PDF on an office printer at 100 percent and scan the code with three different phones, including at least one older Android handset. If it fails on paper at home, it will fail on the press. After printing: scan a sample from the top, middle and bottom of the stack, because ink density drifts across a long run. For retail codes, ask the printer for a verification report graded A to D on a GS1 verifier; most retailers require grade C or better, and some require B.
If the code has a logo in the middle, test more carefully. Logos work only because of error correction, and a logo that covers more than about 20 percent of the code area uses up the correction budget that would otherwise handle a scuff or a fold.
Codes in jobs we print
Barcode and QR placement is part of the preflight on every job that goes through our colour printing service. We check module size against the printed dimensions, flag quiet-zone intrusions, confirm the code is K-only and vector, and on packaging jobs we scan a press sample with a verifier before the run is finished. If you supply the URL or the GS1 number rather than a finished code, we can generate the code correctly sized for the piece and send it back in the proof for your approval. Details are on the digital and colour printing page; for a job where the code is the whole point, such as a product label or a ticket, mention it when you order through the contact page and we will add the verification step.
A code that scans is not a design detail. On a label it is the difference between a product that sells and one that gets sent back to the warehouse.