Java EAN-13 Generator Tutorial

Generate, create barcode EAN-13 images in Java applications (Servlet, Class, Jasper Report)

Generate, Create, Print, Draw EAN-13 barcode in Java projects

  • Easy to generate EAN-13 barcodes in Java Class, J2EE applications
  • Simple to redistribute Java EAN-13 barcode library. No registration key. No activation code.
  • Generating high quality EAN-13 Bar Code images in GIF, JPEG, & EPS formats
  • Generate EAN 13 barcodes in Jasper Reports, iReport & Eclipse BIRT
  • Completely developed with Java source code
  • Mature EAN 13 barcode generation Java library used by 2000+ clients


How to create, print EAN-13 barcode in Java web, desktop application?

  1. Download Java EAN-13 Barcode Generator library
  2. Install Java EAN-13 barcode generation library into Java project
  3. Start to Create




























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 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:
  1. 2 or 3 digits for the number system or the country code
  2. 5 or 4 digits for the manufacturer code or prefix
  3. 5 digits for the product code
  4. 1 digit for the check digit
Using Java barcode library, you can input EAN13 12 data text or 13 digits data with checksum digit to the barcode object.

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 method setResolution()
  • 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))




































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.