SDK Documentation Help

Codabar

Codabar is a variable-length linear barcode symbology developed in 1972 and standardized in the AIM-BC3-2000 specification.

STRICH implements Rationalized Codabar, which uses a fixed ratio of 3:1 for the wide and narrow elements, as recommended in the AIM-BC3-2000 specification. Previous specifications such as the original Pitney-Bowes specification used a fixed character width and varying wide-narrow ratios.

Codabar is widely used in libraries. A sample Codabar barcode is shown below.

Sample Codabar barcode

Symbology Characteristics

Configuration name

codabar

AIM specification

AIM-BC3-2000

Encodable character set

Numeric (0-9), six special characters (-, $, :, /, ., +) and four start/stop characters (A, B, C, D) that are transmitted as well as they are used to distinguish applications.

Integrity protection

Optional mod 16 check digit

Quiet zone

Leading and trailing quiet zone of at least ten modules (10X) is required

Optional Check Digit

Codabar supports an optional check character for enhanced data security (AIM-BC3-2000, E.3 A Check Character Format). The check digit is placed immediately after the final data character and before the stop character.

By default, check digit verification is disabled (checksumMode is set to 0) and all characters, including the check digit, will be returned when the barcode is read. If the SDK is configured to validate the check digit, it can either be stripped (1) or transmitted (2).

Example: Codabar barcode with check digit

The barcode belows encodes the value A1234567890A and includes a check digit that is not visible in the human-readable interpretation below the barcode.

Sample Codabar barcode with check digit

If check digit verification is disabled, the barcode will read as A12345678903A with the final 3 being the check digit.

Configuration Options

Option

Description

Sample Configuration

Default

minLen

The minimum length of scanned codes

const config = { engine: { symbologies: [ { name: "codabar", minLen: 8 } ] } }

4

maxLen

The maximum length of scanned codes

const config = { engine: { symbologies: [ { name: "codabar", maxLen: 16 } ] } }

32

qz

The minimum size of the quiet zone, in modules (X)

const config = { engine: { symbologies: [ { name: "codabar", qz: 10 } ] } }

5

checksumMode

Check digit (mod 10) processing mode:

0: no check digit expected

1: validate and strip check digit

2: validate and transmit check digit

const config = { engine: { symbologies: [{name: "codabar", checksumMode: 1}] } }

0

Start/Stop Characters

Codabar uses four distinct start/stop characters, A, B, C and D. Although the AIM specification says otherwise, the start/stop characters are often not included in the human-readable interpretation printed below the barcode.

AIM specification note on start/stop characters being included in the human-readable interpretation

The SDK includes start/stop characters in its output, as they can be used for application-specific purposes.

Start and stop characters also count towards the barcode length and need to be taken into consideration when using minLen and/or maxLen to restrict the acceptable barcode length.

Example: Codabar library barcode

The Codabar barcode below encodes the value A34444913793584B, with A used as start character and B as stop character. The total length of the barcode is 16.

Sample Codabar library barcode

To restrict the SDK to only these types of barcodes, you could set minLen and maxLen to the 16.

const config = { engine: { symbologies: [ { name: "codabar", minLen: 16, maxLen: 16 } ] } }
Last modified: 07 October 2024