Technical Information

Barcode properties

Text property

The Text property represents the barcode data in a human-readable format.

2D barcodes (PDF417, QR, DataMatrix) may contain both textual data in various languages as well as binary data. To recover the most accurate and relevant barcode values from the barcode in the Text property ClearImage readers employ a combination of several techniques:

  • Detect ECI and Unicode indicators to derive the language-specific text.
  • Make XML data stored in the barcode more readable with the appropriate level of indentation
  • Present the data from Driver Licenses and ID Cards cards in a uniform XML format.
  • Decompress data that was previously compressed by Adobe® LiveCycle® ( trademarks of Adobe Systems Incorporated).

Data property

The Data property returns a byte array with the original, unprocessed binary data stored in the barcode. As with any binary file, the application must be aware of the stored data format to properly interpret the data.

Structured Append / Macro PDF417

Structured Append (or SA) mode is a special mode defined by PDF417, DataMatrix, and QR standards to encode a large amount of text or binary data into multiple barcodes (SA segments). In PDF417 standard, this mode is called Macro PDF417. ClearImage processes SA segments according to the corresponding standards and  AIM ECI standards in buffered and unbuffered modes.

Buffered mode

In buffered mode:

  • A single barcode value reconstructed from multiple consecutive SA segments.
  • Barcode’s Metadata contains details about individual SA segment information.
  • Note: If not all SA segments are present or some segments failed to read, then a partial barcode value is reconstructed from consecutive SA segments.

To obtain barcode values in buffered mode:

  • COM and Java API: Use Find(0) method read barcodes on a page.
  • .NET API:
    • Set BarcodeReader.MaxBarcodes = 0 (note: zero is a default value. No need to initialize explicitly)
    • Use BarcodeReader.Read (filename, page) to reconstruct SA value from the SA segments on a single page
    • Use BarcodeReader.Read (filename) to reconstruct SA value from the SA segments on all pages in a file.

Unbuffered mode

In unbuffered mode:

  • Each SA segment’s barcode value is returned separately.
  • As required by standards, both Text and Data properties start with the following:
    • Symbology identifier: 3-characters sequence starting with ] character
    • Macro Control Block: sequence starting with \MI and ending \MY
  • Barcodes’s Metadata contains the SA information for this segment.
  • Note: Each segment is decoded separately. Therefore ECI encoding that starts in a previous segment would not be applied to the current segment.

To obtain barcode values in unbuffered mode:

  • COM and Java API
    • use FirstBarcode () / NextBarcode () methods
    • use Find (maxBarcodes) where maxBarcodes is not 0.
  • .NET API
    • set BarcodeReader.MaxBarcodes = N; where N > 0
    • use one of the BarcodeReader.Read (…) method

Metadata

Metadata is the information in XML format that describes various properties of barcode, such as PDF417 rows/columns/ECC level, language-specific code pages, ECI codes, and Structured Append information.

To obtain Metadata:

C#
C++


Other barcode properties

Other elements of the information associated with the barcode are available to the user application:

Property

Description

Type

Barcode symbology. This value is typically used to filter the barcode of interest when multiple barcodes are present on a page or in the file.

Length

A number of bytes representing barcode value in Data property.

Rectangle

Location of barcode on a page. This value is typically used to filter barcodes of interest when multiple barcodes are present on a page.

Rotation

Barcode rotation is relative to the page image. This value may identify page scanning orientation. For example, if you know that the barcode is printed horizontally on the page, then an “upside down” barcode rotation indicates that the page was scanned upside-down. You can use the ClearImage Rotate method to correct the image.

TopLeft, TopRight, BottomLeft, BottomRight

Location of barcode corners on a page.

ModuleSize

Average width (in pixels) of the barcode modules. This value is important for tuning the barcode creation and scanning process. To optimize performance, it is recommended that for 1D barcodes and PDF417, this value be in the range of 3 to 10 pixels, while for DataMatrix and QR, from 5 to 15 pixels.

File

Name of the file containing barcode (.NET API only)

Page

Page number containing barcode (.NET API only)