Barcode Xpress for Java v13.9 - Updated
Code 39
Supported Barcode Types > Barcode Types > Code 39

The Code 39 barcode is a variable-length, alphanumeric, self-checking, bi-directional 1D barcode with an optional checksum for error detection. Code 39 is widely used in industries across the world. It is also the standard for many government barcode specifications, including the U.S. Department of Defence.

Example Barcode

The following example barcode encodes the information "CODE 39" as an Code 39 barcode:

Code 39

Details

Code 39 was the first alphanumeric symbology. It only includes the uppercase alphabetic characters. Code 39 also includes the characters space " ", minus "-", plus "+", period ".", dollar sign "$", slash "/", and percent "%".

Barcode Breakdown

In Code 39 barcodes, each data character is made up of 5 bars and 4 spaces for a total of 9 elements. Each character includes 3 wide and 6 narrow elements. Thus, 3 out of the 9 elements are always wide, which is the reason why the symbology is sometimes called "Code 3 of 9".

Managing Organization

The Code 39 is governed by ISO/IEC 16388. 1

Error Correction

Each Code 39 barcode can include an optional modulo 43 checksum. Additionally, Code 39 symbology is self-checking.

Platform-Specific Notes

If you don't set the reader BarcodeTypes property to specifically look for Code 32 barcodes, the barcode engine might confuse a Code 32 barcode with a Code 39 barcode (since Code 32 is a subset of Code 39 and Barcode Xpress assumes the barcode is a Code 39 when looking for Code 39 or both).

By default, Barcode Xpress does not write optional checksums. If a checksum is required for Code 39, set the CheckSum property to 1(TRUE) and Barcode Xpress will calculate and write the checksum.

Code 39 requires a quiet zone, which should be at least the width of 10 narrow bars. This means that if you set the MinimumBarWidth property to 3 pixels (narrow bar size), set the HorizontalWhiteSpace property to 30 pixels.

If you don't set the reader BarcodeTypes property to specifically look for Code 32 barcodes, the barcode engine might confuse a Code 32 barcode with a Code 39 barcode (since Code 32 is a subset of Code 39 and Barcode Xpress assumes the barcode is a Code 39 when looking for Code 39 or both).

By default, Barcode Xpress does not write optional checksums. If a checksum is required for Code 39, set the CheckSum property to 1(TRUE) and Barcode Xpress will calculate and write the checksum.

Code 39 requires a quiet zone, which should be at least the width of 10 narrow bars. This means that if you set the MinimumBarWidth property to 3 pixels (narrow bar size), set the HorizontalWhiteSpace property to 30 pixels.

If you don't set the reader SetBarcodeReaderType method to specifically look for Code 32 barcodes, the barcode engine might confuse a Code 32 barcode with a Code 39 barcode (since Code 32 is a subset of Code 39 and Barcode Xpress assumes the barcode is a Code 39 when looking for Code 39 or both).

By default, Barcode Xpress does not write optional checksums. If a checksum is required for Code 39, set the WriteChecksumChar property to True and Barcode Xpress will calculate and write the checksum.

Code 39 requires a quiet zone, which should be at least the width of 10 narrow bars. This means that if you set the MakeBarcodeBarSize property to 3 pixels (narrow bar size), set the MakeBarcodeBWidth property to 30 pixels.

If you don't set the reader setBarcodeTypes method to specifically look for Code 32 barcodes, the barcode engine might confuse a Code 32 barcode with a Code 39 barcode (since Code 32 is a subset of Code 39 and Barcode Xpress assumes the barcode is a Code 39 when looking for Code 39 or both).

If you don't set the reader BarcodeTypes property to specifically look for Code 32 barcodes, the barcode engine might confuse a Code 32 barcode with a Code 39 barcode (since Code 32 is a subset of Code 39 and Barcode Xpress assumes the barcode is a Code 39 when looking for Code 39 or both).

By default, Barcode Xpress for Linux does not write optional checksums. If a checksum is required for Code 39, set the EnableCheckSum property to 1(TRUE) and the barcode engine will calculate and write the checksum.

Code 39 requires a quiet zone, which should be at least the width of 10 narrow bars. This means that if you set the MinimumBarWidth property to 3 pixels (narrow bar size), set the HorizontalWhiteSpace property to 30 pixels.

If you don't set the reader type parameter to specifically look for Code 32 barcodes, the barcode engine might confuse a Code 32 barcode with a Code 39 barcode (since Code 32 is a subset of Code 39 and Barcode Xpress assumes the barcode is a Code 39 when looking for Code 39 or both).

By default, Barcode Xpress detects Code 39 barcodes only with start and stop patterns. Use the Code39StartStopPatternsAreMandatory property to search for Code 39 barcodes without start and stop patterns.

Similar Barcode Types

Code 39 is also referred to as "Code 3 of 9".

Barcode Variants

Code 39 Extended is a variant of Code 39 which extends support to the full ASCII character set. Code 32 is another variant that supports a subset of Code 39 characters.

Related Barcodes

Code 93 barcodes were designed to increase data density and integrity in comparison to Code 39 symbology.

References

  1. "Code 39 Bar Code Symbology Specification." ISO/IEC 16388:2007, ISO/IEC, Feb. 2008, www.iso.org/standard/43897.html.


For additional background and use-case information see our Code 39 barcode page.
For more information, see the Barcode Xpress SDK product page or try our online demos.

Is this page helpful?
Yes No
Thanks for your feedback.