content
What the code says doesn't fit the pack it is on.
| Levels | fail, check |
| Applies to | codes that carry a GTIN, and QR codes on a page with a retail barcode |
| Needs a print size | no |
What it means
The bars are fine as bars, and the number in them is the problem: the digits printed underneath say something else, the number is a sample left in from a template, its prefix belongs to coupons or books, or the QR code on the pack points at a different product than the barcode does.
Why scanners care
The scanner reads it without complaint. The till then rings up the wrong product or none, or a cashier keys in the printed digits and gets a different number from the bars.
How to fix it
- Digits and bars differ: regenerate the barcode from the right number. Never retype the digits under existing bars.
- No digits under an EAN or UPC: turn the human-readable text back on in the barcode software.
- Sample, demonstration or placeholder number: replace it with the GTIN issued for this product.
- Coupon, restricted or unissued prefix: check the number with whoever allocated it.
- QR code and barcode disagree: both must carry the same GTIN.
What it reports
prefixProblems, packProblems and the rest in src/rules/content.ts; the HRI presence check in src/rules/rules.ts.
| Finding | Level | Source |
|---|---|---|
| digits printed under the code differ from what it encodes | fail | §5.2.5, §4.14 |
| nothing printed where an EAN or UPC's digits go | fail | §5.2.5: "SHALL be printed underneath the main symbol" |
| the GTIN is all zeros | fail | none: a placeholder |
| the GTIN is a known sample number (GS1's 950 6000…, 5012345678900, 1234567890…) | fail | none: the list is this package's own |
| a 13-digit number with five leading zeros | fail | Table 1-4: 0000001–0000099 "unused to avoid collision with GTIN-8" |
| prefix 980 (refund receipts), 981–983 or 99 (coupons) | fail | Table 1-4 |
| prefix 952: GS1's demonstration range (GTIN-8 too) | fail | Tables 1-4, 1-5 |
| prefix 977, 978 or 979 (magazines, books, sheet music) on a page that reads like a food pack | fail | Table 1-4 |
| prefix 02, 04 or 2 (GTIN-8: 0 or 2): restricted circulation, scans only where it was set | check | §1.2.2.2.1; Tables 1-4, 1-5 |
| prefix 984–989, or one GS1's list says is held for a future member organisation (610, 614, 623, 758, 894): reserved | check | Table 1-4; GS1's public prefix list |
| a prefix in a company prefix range that GS1's public list allocates to no member organisation (for example 140–199, 390–399) | check | GS1's public list: "Prefixes not explicitly listed above are reserved by GS1 Global Office for future use" |
| a Digital Link QR whose GTIN isn't the retail barcode's on the same page | fail | §4.13.1, Table 4-4: one GTIN per item |
| a QR code on a page with a retail barcode that opens a plain web address | check | none: advice for the move to 2D at tills |
| the same GTIN in another product's file | check | §4.2 (GTIN allocation) |
Prefix 05 (a UPC-A starting with 5) issues company prefixes (Table 1-4); it was once the UPC coupon number system and is no longer flagged.
The member organisation of each prefix is from GS1's public list at https://www.gs1.org/standards/id-keys/company-prefix, read 2026-11-27 (PREFIX_LIST_SOURCE and RANGES in src/rules/symbols.ts). A GTIN-8 prefix that list doesn't name is not flagged: the list covers GS1-8 Prefixes only for 960–969.
Limits
- Digits are compared only when they are text in a PDF, on a line of digits close to the code. Outlined type and digits inside a picture aren't read. From a PNG or JPEG the grader can only tell whether anything is printed where the digits go.
- "Reads like a food pack" is a keyword match on the page's text (
FOODinsrc/rules/content.ts). - The "same GTIN in another file" check runs only when a library caller passes the other files' GTINs to
gradeCodes. The CLI doesn't. - The plain-web-address finding is advice for the move to 2D barcodes at tills. No GS1 rule requires a QR code to be a Digital Link.
- An add-on's digits (EAN-2, EAN-5) are reported in
addOnand the summary, and not checked.
Spec
GS1 General Specifications, Release 26.0: §5.2.5 and §4.14 (human readable interpretation), §1.2.2.2.1, §1.2.3.1 Table 1-4 and §1.2.3.2 Table 1-5 (prefixes), §4.13.1 (one GTIN per item). Full table: spec map, content.