How to generate, print Code 39 barcode in BIRT reports?

Generate barcode Code 39 images in BIRT Reports

Generate Code-39 Barcode in BIRT Reports, Code-39 Barcode Generation using BIRT Barcode Generator

  • Generate Code 39 barcodes in BIRT reports easily without programming
  • Simple to redistribute BIRT Code 39 barcode library (jar)
  • No registration key or activation code needed
  • Generating high quality Code 39 Bar Code images in GIF format
  • Completely developed in Eclipse BIRT Custom Extended Report Item framework.
  • Mature BIRT Code39 barcode generation plugin using Java Barcode Generator library

Here we will learn how to generate and print Code 39 (a widely used linear barcode symbology) images in BIRT (Business Intelligence and Reporting Tools) reports within Eclipse Java projects.

All Code 39 property configurations are completed in the Report Item Property view of your Report Design (.rptdesign) file, fully compliant with BIRT development standards.

Below is the core content overview of this guide (all operations apply to Eclipse Java projects integrated with BIRT):
  • Complete environment setup for Eclipse Java project and BIRT Report Designer, including integration of BIRT barcode generation libraries and BIRT core dependencies.
  • Step-by-step guidance for generating standard Code 39 and Full ASCII Code 39 in BIRT reports with Data Binding.
  • Configuration of MOD43 check digit, HRI display, and Start/Stop characters for Code 39 in Report Item Property.
  • Customization of Code 39 dimension parameters (UOM, X, Y, N, I, margins) in BIRT report layout.
  • Adjustment of wide-narrow bar ratio and intercharacter gap for Code 39 to meet scanning standards.


How to create, print Code 39 barcodes in Eclipse BIRT reports?

  1. Download BIRT Code 39 Barcode Generator plugin
  2. Install BIRT barcode generation plugin jar file into BIRT report project
  3. Start to Create












BIRT Barcode Code 39 Generator Introduction

Top
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 Code-39 Introduction

Code 39 (also known as "USS Code 39", "Code 3/9", "Code 3 of 9", "USD-3", "Alpha39", "Type 39") is a barcode symbology that can encode uppercase letters (A through Z), digits (0 through 9) and a handful of special characters like the $ sign.



Code 39 is restricted to 44 characters. In Full ASCII Code 39 Symbols 0-9, A-Z, "." ,and "-" are the same as their representations in Code 39. Lower case letters, additional punctuation characters and control characters are represented by sequences of two characters of Code 39.

BIRT Code-39 Generator - Valid Data Scope

  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Uppercase letters (A - Z)
  • - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)
  • BIRT Code 39 Extension Generator support all 128 ASCII characters

Code 39 Generators

OnBarcode provides several Code 39 Generator components and software, including .NET Code 39 Generator, Java Code 39 Generator, C# Code 39 Generator, VB.NET Code 39 Generator, Code 39 Generator.




How to Generate Code 39 in BIRT Report

Top
Follow the steps below to print a Code 39 barcode in Eclipse BIRT Report. For details, view here: BIRT Barcode Generator - Developer Guide
  1. Copy com.onbarcode.barcode.birt_2.2.1.jar to your Eclipse plugins directory "\eclipse\plugins\"
  2. Create a new empty report in your BIRT Report barcoding project
  3. Open View "Palette", and add report item "Barcode" to your created BIRT report
  4. Right click the report item you have added, and select "Properties" menu item to edit barcode parameters
  5. All the barcode properties are in the "General" tab. Please note that the values for "Data" and ""UPC/EAN Supplement Data" should be arounded by """, unless you are inputting expression
  6. Change Barcode Type into Code 39 in the general tab, and preview the report. A Code 39 barcode image is printed on your BIRT report
  7. If you want to encode barcode data from BIRT report data set, you need to input expression to "Data" property like "row["CUSTOMERNUMBER"]"





BIRT Barcode Code 39 Generator - Property Settings

Top
Category Properties Value Comments
Basic Property: Data Type: expression
Default: ""
  • If you encode the barcode data text directly, the text string should be around by " " ", such as "12345"

  • If you encode the barcode data from dataset, input the expression, such as row["CUSTOMERNUMBER"]
Barcode value to encode.

Code 39 Valid Data Char Set:

  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

  • Uppercase letters (A - Z)

  • - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)


Code 39 extension Valid Data Char Set:

  • all 128 ASCII characters

Property: Add CheckSum Char Type: boolean
Default: false
Add CheckSum Char property is optional. Modulo 43 will be applied, if addCheckSum property is true.
 
Code 39
Special
Property: Code 39 extension Type: boolean
Default: false
If you want to encode any 128 ASCII characters, extension must be true.
Property: I Type: float
Default: 1.0f
The space between 2 characters in code 39. This a multiple of X.
Property: N Type: float
Default: 2.0f
Wide/narrow ratio, 2.0 - 3.0 inclusive, default is 2.
Property: Code39 Show Start Stop Chars Type: boolean
Default: true
If true, display a * in the beginning and end of barcode text
Property: Process Tilde Type: boolean
Default: false
Set the processTilde property to true, if you want use the tilde character "~" to specify special characters in the input data.

  • 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255); ASCII character '~' is presented by ~126
    Strings from "~256" to "~299" are unused
 
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:

  • 0 (rotate angle in 0 degree)
  • 90 (rotate angle in 90 degree)
  • 180 (rotate angle in 180 degree)
  • 270 (rotate angle in 270 degree)
 
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


Code 39 Barcode Data Character Encoding in BIRT

Code 39 supports two encoding modes, both configured in Report Item Property.


Code 39 Standard Mode

Supports 43 valid characters:
  • Numeric digits: 0 - 9
  • Uppercase letters: A - Z
  • Symbols: -, $, %, space, ., /, +
  • Dedicated Start/Stop character (*)
Set Type property to CODE39 in Report Item Property.



Code 39 Full ASCII Mode

  • Supports full 128 ASCII characters (ISO 646 IRV), including lowercase letters.
  • Set Type property to CODE39EX (extended mode) in Report Item Property.
  • Used for reports requiring lowercase, special control characters, and Locale/Internationalization support.



Code 39 Check Digit (MOD43) Configuration

Code 39 does not enable check digit by default. MOD43 check digit enhances data security.
  • Enable check digit: set AddCheckSum = true in Report Item Property.
  • The BIRT Report Engine automatically calculates and appends the MOD43 check digit.
  • To hide check digit in HRI (human readable interpretation): set ShowCheckSumChar = false.



Note: The check digit is only used for verification and will not be decoded as valid data by scanners.


Hide Check Digit in HRI

  • Enable the check digit but hide it from the HRI (human readable interpretation).
  • Set ShowCheckSumChar = false in Report Item Property.
  • This keeps the barcode valid while cleaning up displayed text.



Code 39 Start/Stop Characters Display

Code 39 uses asterisk (*) as fixed Start/Stop characters, which should not be included in raw data.
  • Show asterisks in HRI: set ShowStartStopInText = true.
  • Hide asterisks in HRI: set ShowStartStopInText = false.
  • This property is fully configured in Report Item Property without additional Script.



Code 39 Barcode Dimension & Size Settings

All size parameters are set in Report Item Property, compatible with BIRT Master Page and layout rules:
  • UOM (Unit of Measure): PIXEL / CM / INCH
  • X: Width of narrow bar module (minimum value defined by application standards)
  • Y: Height of bar module
  • N: Wide/narrow bar ratio (valid: 2.0 - 3.0; default = 2)
  • I: Intercharacter gap (minimum = X; multiple of X)
  • LeftMargin / RightMargin: Quiet zone (minimum width = 10X)



Customize Code 39 Bar, Space Appearance

You can adjust bar width ratio and character spacing for better scanning and readability.


Wide/Narrow Bar Ratio (Property N)

  • Valid range: 2.0 to 3.0 (inclusive)
  • Default value: 2.0
  • Set directly in Report Item Property; higher values improve scanning accuracy for low-resolution printers.



Intercharacter Gap (Property I)

  • Defines the space between two encoded characters.
  • Value is a multiple of narrow bar width (X).
  • Default = 1.0; adjust to 2.0 for clearer character separation.













Common Asked Questions

What is Code 39 barcode used for?

Code 39, also known as Code 3 of 9, is the first barcode symbology to encode both numbers and letters (Upper case letters only). It is most commonly used in the inventory, government, military and electronics industries.

Using BIRT barcode generator plugin, you can create and insert a new Code 39 or Code 39 extension barcode into report template. Standard or regular Code 39 barcode encodes upper-case letters only. To encode lower-case letters, you need choose Code 39 extend barcode.

To create Code 39 extended barcodes in Report Designer, change Barcode Type to Code 39 extension

Can Code 39 barcode encode lowercase letters in BIRT reports?

Code 39 barcode standard version does not support lowercase letters encoding. However the Code 39 extended version does. OnBarcode BIRT Barcode Generator plugin does support both Code 39 standard and extend versions. In BIRT report Property Editor, change property Barcode Type to value Code39, by default it will create standard Code 39 barcode images. To create Code 39 extended barcodes in reports, change property Barcode Type to value Code39 extension in Eclipse BIRT reports application.

What is the minimum size for Code 39 barcode?

Code 39 barcodes need meet the following barcode dimension size requirements in BIRT report Property Editor
  • X: the mimumum bar width (X module) is defined by the application specification.
  • Y: the mimumum bar height (Y module)

What is the ratio of narrow to wide bars in Code 39 barcode?

The valid ratio of Code 39 narrow to wide bars is from 1:2 to 1:3 inclusive. You can apply the Code 39 bars ratio configure through report designer property N using BIRT Barcode in Eclipse BIRT report designer.

What is the difference between barcode 39 and barcode 93?

Bath Code 39 and Code 93 are linear (1d) barcode formats. Code 93 is an updated version of Code 39. Code 93 is a higher-density barcode type compared to Code 39. BIRT barcode supports both Code 39 and Code 93 barcodes generation and printing in Eclipse BIRT reporting applications.

What is the difference between Code 39 and Code 128 barcodes?

Bath Code 39 and Code 128 are linear (1d) barcode symbologies. Code 128 requires a compulsory checksum digit. If the Code 128 barcode is damaged, it may still be scannable. Code 39 checksum is optional. If the Code 39 barcode without checksum is damaged, it won't be scannable. In BIRT report template, you can generate Code 39 barcode with or without check sum applied using BIRT Barcode Generator plugin.




































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