Common Asked Questions
What is the EAN-13 code?
EAN-13 is a 13-digit barcode, which includes 12 GS1 data digits and 1 check digit. EAN is short for European Article Number,
and now it is renamed as GTIN (Global Trade Item Number). EAN 13 code will be used to uniquely identify retail products worldwide.
In Java class, you can input EAN-13 12 digits data text or whole 13 digits with check sum, the Java barcode generator library will generate and print the EAN13 barcodes through class
In Java class, you can input EAN-13 12 digits data text or whole 13 digits with check sum, the Java barcode generator library will generate and print the EAN13 barcodes through class
com.onbarcode.barcode.EAN13
in Java class and JSP, Servlet web applications.
What is the difference between EAN and EAN-13?
EAN barcode includes EAN-13, EAN-8. You can use OnBarcode Java barcode library to encode and print EAN-13, and EAN-8 barcode images easily in Java projects
What is the EAN-13 barcode layout?
The whole 13 digits EAN-13 code is grouped as follows:
You will find more information here: EAN-13 barcode data structure.
- 2 or 3 digits for the number system or the country code
- 5 or 4 digits for the manufacturer code or prefix
- 5 digits for the product code
- 1 digit for the check digit
You will find more information here: EAN-13 barcode data structure.
How to check if the EAN-13 barcode created in Java is valid?
The last digit of EAN-13 is a check digit. It will be used to verify the first 12-digit GS1 data message.
Using Java barcode library,
the generated EAN-13 barcode check digit is calculated and verified by the barcode SDK API.
What is the minimum size for EAN-13?
The GS1 recommended minimum size for an EAN-13 barcode is 30mm in width and 20 mm in height.
You can customize the EAN-13 barcode image with and height through method
setBarcodeWidth and setBarcodeHeight in
Java class com.onbarcode.barcode.EAN13
How do I print high quality EAN-13 barcodes in Java?
To print good quality EAN-13 barcodes in Java projects, you need follow the rules below.
- The EAN-13 barcode image resolution (DPI) is the same or higher than the printer's resolution.
In Java class
com.onbarcode.barcode.EAN13, customize the barcode image resolution through methodsetResolution() - The EAN-13 barcode human readable text is using the legible fonts. The GS1 System recommends use OCR-B font to draw EAN-13 text label.
Here is the sample Java source code to apply fonts:
setTextFont(new Font("OCR-B", Font.PLAIN, 13))
