BIRT Barcode EAN-13 Generator Introduction
BIRT Barcode is an Eclipse BIRT Custom Extended Report Item which helps you easily generate and print high quality 1D (linear) and 2D (matrix) barcodes in your BIRT reports.
Barcode EAN-13 Introduction
EAN-13 barcode (originally European Article Number) is a barcoding standard which is a superset of the original 12-digit Universal Product Code (UPC) system developed in the United States. The EAN-13 barcode is defined by the standards organisation GS1. The numbers encoded in EAN-13 bar codes are product identification numbers which are called Japanese Article Number (JAN) in Japan. All the numbers encoded in UPC and EAN barcodes are known as Global Trade Item Numbers (GTIN), and they can be encoded in other GS1 barcodes.
BIRT EAN 13 Generator - Valid Data Scope
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
EAN-13 Generators
OnBarcode provides several EAN-13 Generator components and software, including .NET EAN-13 Generator, Java EAN-13 Generator, C# EAN-13 Generator, VB.NET EAN-13 Generator, EAN-13 Generator.
How to Generate EAN-13 in BIRT Report
Follow the steps below to print EAN-13 in BIRT Report. For details, navigate here: BIRT Barcode Generator - Developer Guide
- Copy com.onbarcode.barcode.birt_2.2.1.jar to your Eclipse plugins directory "\eclipse\plugins\"
- Create a new empty report in your BIRT Report barcoding project
- Open View "Palette", and add report item "Barcode" to your created BIRT report
- Right click the report item you have added, and select "Properties" menu item to edit barcode parameters
- Now all the barcode properties are in the "General" tab. Note that the values for "Data" and ""UPC/EAN Supplement Data" should be arounded by """", unless you are inputting expression
- Change Barcode Type into EAN-13 in the general tab. Preview the report and an EAN-13 barcode image is printed on your BIRT report
- To encode barcode data from BIRT report data set, you need to input expression to "Data" property like "row["CUSTOMERNUMBER"]"
BIRT Barcode EAN-13 Generator - Property Settings
| Category | Properties | Value | Comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic | Property: Data | Type: expression
Default: ""
|
Barcode value to encode.
EAN 13 Valid Data Char Set:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Add CheckSum Char |
Type: boolean
Default: false |
Add CheckSum Char property is not applied here. BIRT Barcode will always add a check character in the last digit (modulo 10). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EAN-13 Related | Property: UPC/EAN Supplement Data | Type: expression
Default: ""
|
Set the supplement data to encode. Valid values are 2 or 5 digits | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: UPC/EAN Supplement Bar Height |
Type: float
Default: 0.8f |
This is a multiplicator of the height of the bar module; The default is 0.8 (80% of Y - bar module height). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: UPC/EAN Space between main bar and supplement bar |
Type: float
Default: 15 |
The separation between the barcode and the supplement. Default is 15 pixel. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Barcode Size Related |
Property: Unit of Measure |
Type: int
Default: 0 (pixel) |
Unit of meature for all size related settings in the library.
Valid values: 0: pixel; 1: inch; 2: cm. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: X |
Type: float
Default: 1 |
Width of barcode bar module (narrow bar), default is 1 pixel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Y | Type: float
Default: 30 |
Height of barcode bar module, default is 30 pixel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Left Margin | Type: float
Default: 0 |
Barcode image left margin size. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Right Margin | Type: float
Default: 0 |
Barcode image right margin size. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Top Margin | Type: float
Default: 0 |
Barcode image top margin size. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Bottom | Type: float
Default: 0 |
Barcode image bottom margin size. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Resolution (in dpi) | Type: int
Default: 72 |
Barcode image resolution in DPI (Dots per inch). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Rotate |
Type: int
Default: 0 (rotate angle in 0 degree) |
Valid values:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Font Style |
Property: Show Text |
Type: boolean
Default: true |
If true, display barcode data text under the barcode, otherwise do not display. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Text Font Size |
Type: int
Default: 11 |
Barcode text font size. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Property: Text Margin |
Type: float
Default: 6 |
Space between barcode and barcode data text, default is 6 pixels | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Quick EAN-13 Barcode Generation in BIRT
EAN-13 supports only numeric digits (0–9).It includes 12 data digits + 1 check digit, structured into: country code, manufacturer code, product code, and check digit.
Follow these steps:
- Select the Image Report Item in your layout.
- Open Report Item Property and set image source to Dynamic Image.
- Perform Data Binding to map the Image to your Data Set field.
- Set these core properties:
- Type = EAN13
- Data = 12‑digit or 13‑digit numeric value (via BIRT Expression)
EAN-13 Barcode Add-on Symbol in BIRT
EAN-13 supports 2‑digit or 5‑digit add‑on symbols for supplements like price or edition.
Configuration steps in Report Item Property:
Configuration steps in Report Item Property:
- For 2‑digit add‑on: set Type = EAN13_2
- For 5‑digit add‑on: set Type = EAN13_5
- Set main barcode data in Data property
- Set supplement data in SupData property
- The BIRT Report Engine automatically renders the add‑on after the main symbol
EAN-13 HRI (Human Readable Interpretation)
GS1 standards recommend using the OCR‑B font for EAN-13 barcode text.
Customize HRI in Report Item Property:
Customize HRI in Report Item Property:
- Set TextFont to "OCR‑B" with preferred size
- Set TextMargin to define space between bars and text
- Minimum recommended space: 0.5X; standard value: 1X
Advanced EAN-13 Customization in BIRT
You can further customize EAN-13 appearance using these properties:
Quiet Zone Indicator
- Set ShowQuietZoneIndicator to true or false
- Default value: true (displays quiet zone marks)
First & Last Digit Spacing
- Set UPCEANLeadDigitSpace to adjust space before the first digit
- Set UPCEANTrailDigitSpace to adjust space after the stop character
- These values improve readability and alignment in your Master Page layout
EAN-13 Check Digit Calculation & Validation
EAN-13 uses a MOD 10 (module 10) check digit algorithm.
In BIRT:
In BIRT:
- The barcode library automatically calculates and adds the check digit.
- You can use a Computed Field or Script to validate the check digit before rendering.
- If you provide 12 digits, the 13th digit is generated automatically.
- If you provide 13 digits, the library verifies the last digit.
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 BIRT report designer, you can encode EAN-13 12 digits data text or whole 13 digits with check sum, the BIRT barcode generator plugin will generate and print the EAN13 barcodes through in BIRT reports.
In BIRT report designer, you can encode EAN-13 12 digits data text or whole 13 digits with check sum, the BIRT barcode generator plugin will generate and print the EAN13 barcodes through in BIRT reports.
What is the difference between EAN and EAN-13?
EAN barcode includes EAN-13, EAN-8. You can use OnBarcode BIRT barcode to encode and print EAN-13, and EAN-8 barcode images easily in Eclipse BIRT reporting web and desktop applications.
What is the EAN-13 barcode layout?
The whole 13 digits EAN-13 code is grouped as follows:
- 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
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 BIRT barcode,
the generated EAN-13 barcode check digit is calculated and verified by the barcode software.
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 property
X and Y in BIRT report designer Property Editor.
How do I print high quality EAN-13 barcodes in BIRT reports?
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 BIRT report designer, set the right value for property
Resolution (in dpi)for high quality printing. - 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.