How it works
Finding
Each PDF page is drawn with pdf.js four times on different pixel grids: 150 dpi, the same shifted half a pixel, 200 dpi and 300 dpi on other phases. An EAN-13 at 100% is under two pixels a module at 150 dpi, so whether a decoder finds it depends on where its bars fall on the grid. Whatever any pass finds is kept once.
Codes the plain picture hides are looked for again in four other views of it.
| view | finds |
|---|---|
| inverted | reversed codes (light on dark) |
| red channel | codes as a till's red light sees them |
| near-black only | codes on dark panels |
| fixed threshold | codes with heavy ink spread |
Text is drawn from pdf.js's own fonts, not the machine's, so a file gives the same result on every machine. In an SVG, text set in Helvetica, Helvetica Neue, Arial, a generic family (sans-serif…) or a family the machine doesn't have is drawn in the Liberation Sans that pdf.js ships, the same on a Mac and on a Linux server without fonts (checked in node:24-bookworm-slim), where it otherwise wasn't drawn at all. A family the machine does have (Futura, say) is drawn in that font, so that text can differ between machines.
Confirming
Each code is drawn again from the original at about ten pixels a module, only its own region, and read again there. A 2D "code" that only appears with failed error correction, or doesn't read again at print resolution, is a pattern in type or a logo and is dropped.
Measuring
On that close-up the bars are measured along the symbol's axis: X-dimension, bar height, clear space each side in modules, bar and space colours. The numbers are judged against the GS1 General Specifications tables and the symbology's own rules. Spec map lists each check with its clause.
Grading
Linear codes follow ISO/IEC 15416: ten scan profiles across the bars through a circular aperture of the size GS1 names, reflectance from the linear red channel, and the usual parameters (decode, minimum reflectance, symbol contrast, edge contrast, modulation, defects, decodability). 2D symbols follow ISO/IEC 15415.
The grade is what the artwork allows. It is not what a verifier will measure on the printed pack; see What it is not.