BIRT Barcode UPC-A 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 UPC-A Introduction
UPC-A is also known as Universal Product Code version A, UPC-A Supplement 5/Five-digit Add-On, UPC-A Supplement 2/Two-digit Add-On, UPC-A+5, UPC-A+2, UPC Code, UPC Symbol, GTIN-12, GS1-12, UCC-12.
BIRT UPC-A Generator - Valid Data Scope
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (11 digits excluding checksum)
UPC-A Generators
OnBarcode provides several UPC-A Generator components and software, including .NET UPC-A Generator, Java UPC-A Generator, C# UPC-A Generator, VB.NET UPC-A Generator, UPC-A Generator.
How to Generate UPC-A in BIRT Report
Below is an example to print UPC-A barcodes in Eclipse BIRT Report. For details, view 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 Data Matrix in the general tab and preview the report. A UPC-A 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"]"
UPC-A barcode with 2 digits add-on symbol
UPC-A barcode with 5 digits add-on symbol
BIRT Barcode UPC-A Generator - Property Settings
| Category | Properties | Value | Comments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic | Property: Data | Type: expression
Default: ""
|
Barcode value to encode.
UPC-A 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). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| UPC-A 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UPC-A Barcode Customization in BIRT
ou can customize UPC-A display properties in the Report Item Property view to meet design and scanning requirements.
These settings integrate with BIRT's Style and Master Page layout rules.
UPC-A Quiet Zone Indicator
- The ShowQuietZoneIndicator property controls visibility of the quiet zone marker.
- Default value: true (displays the indicator).
- To hide the indicator: set ShowQuietZoneIndicator = false.
- This property ensures compliance with retail barcode printing standards.
UPC-A First & Last Digit Customization
You can adjust spacing, position, and font size for the first and last digits:
- UPCEANLeadDigitSpace: Set space between the first digit and start bar.
- UPCEANTrailDigitSpace: Set space between the stop bar and quiet zone indicator.
- UPCEANLeadDigitYShift: Adjust vertical offset of the first digit.
- UPCEANTrailDigitYShift: Adjust vertical offset of the last digit.
- UPCEANLeadTrailDigitSizeRatio: Set font size ratio for first/last digits.
UPC-A Check Digit Calculation
UPC-A uses a MOD 10 (module 10) check digit algorithm for data validation.
In BIRT:
- The BIRT barcode library automatically calculates the check digit.
- If you input 11 digits, the 12th check digit is added automatically.
- If you input 12 digits, the library validates the last digit.
- Assign odd/even positions from right to left.
- Sum digits in odd positions and multiply by 3.
- Sum digits in even positions.
- Add the two results together.
- The check digit makes the total sum divisible by 10.
Common Asked Questions
What is a GTIN-12 UPC-A barcode?
GTIN-12 is a 12 digits Global Trade Item Number. It is usually encoded in UPC-A barcode. The 12 digits Global Trade Item Number includes 11 digits of data message,
and one digit of check sum digit. Using BIRT Barcode plugin, you can encoding 12-digit GS1 numeric data or 13-digits data with checksum digit from database.
What is the minimum & maximum size for a UPC-A barcode?
- The Minimum X-dimension for the UPC-A barcode is 0.0104 inches.
- The Maximum X-dimension for the UPC-A barcode is 0.0260 inches
X in Eclipse BIRT report designer property editor using BIRT Barcode Generator plugin.
What is the difference between EAN-13 and UPC-A?
UPC-A Format barcodes have traditionally been used in the North America (USA and Canada), whereas EAN-13 format barcodes have been used throughout the rest of the world.
BIRT Barcode Generator supports both UPC-A and EAN-13 with add-on symbol barcode generation in BIRT reports, and customize, print EAN/UPC barcode in report designer.
What is the difference between UPC-A and UPC-E?
Both of UPC-A and UPC-E are UPC barcode.
UPC-A is a 12-digit barcode, and UPC-E is a compressed UPC-A with 6 digits code. The UPC-E will be used in limited space for a barcode.
You can create both UPC-A and UPC-E images in BIRT reporting projects using BIRT barcode plugin.