UPC-A barcode in PHP: 12 digit input, check digit, add-on symbols, code examples and SVG output
Your support helps keep this website running. Please consider supporting this project. SPONSORDONATE
- Nicola Asuni
The twelve-digit North American retail symbol, and the oldest of this family: the first UPC-A was scanned in 1974. It is an EAN-13 with a leading zero, and the library encodes it as one, which is why getExtendedCode() returns thirteen digits.
Type Token
Item
Value
Type token
UPCA
Enum case
BarcodeType::UPCA
Family
Linear
Standard
ISO/IEC 15420, GS1 General Specifications
Class
\Com\Tecnick\Barcode\Type\Linear\UpcA
Input
Item
Value
Character set
digits, plus + to introduce an add-on
Length
11 digits, or 12 with a valid check digit
Check
modulo 10, appended when the payload is 11 digits and verified when it is 12