-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Johan Lindell edited this page Apr 22, 2016
·
8 revisions
EAN comes in a variety of forms, most commonly used is EAN-13 (GTIN-13) that is used on world wide to marking the identity of products.
JsBarcode supports the formats EAN (13), EAN-8 and UPC as well as the barcode addons EAN-5 and EAN-2.
JsBarcode("#barcode", "5901234123457", {format: "EAN"});
JsBarcode("#barcode", "123456789999", {format: "UPC"});
JsBarcode("#barcode", "96385074", {format: "EAN-8"});
JsBarcode("#barcode", "54495", {format: "EAN-5"});
JsBarcode("#barcode", "53", {format: "EAN-2"});
EAN-5 and EAN-2 is addon barcodes an is always used combined with EAN-13 or EAN-8. The advanced JsBarcode syntax can be used to add these addons to the barcodes.
JsBarcode("#barcode")
.EAN13("1234567890128")
.blank(20) // An blank creates a space between the barcodes
.EAN5("12345", {height: 85, textPosition: "top", fontSize: 16})
.render();
EAN (13), UPC and EAN-8 all have the last digit being a check digit to verify the content that is encoded. This digit is considered a part of the number and JsBarcode will verify it before generating the barcode.
If the last digit of these barcodes are not specified it will automatically be calculated and added.
JsBarcode("#barcode", "96385074", {format: "EAN-8"});
// These two are generating identical barcodes
JsBarcode("#barcode", "9638507", {format: "EAN-8"});
- Home
- Options
- Setup
- Browser Setup
- Node Setup
- Barcodes
- CODE128
- EAN / UPC
- CODE39
- ITF-14
- MSI
- Pharmacode
- Codabar