Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Cordova

Changing the Length of the Barcodes to Decode

By default the Scandit Barcode Scanner scans barcodes with a fixed symbol count range. Under certain conditions it is helpful to modify the length of the barcode to be decoded, for example if

  • you want to scan longer codes which can not be decoded with the default settings.
  • to optimize decoder performance for codes of certain lengths; when it is known that the application only requires scanning of particular barcode lengths.

The mapping from characters to symbols is symbology-specific. For some symbologies, the start and end characters are included, others include checksums characters in the symbol counts.

The active symbol count setting is ignored for fixed-size barcodes (the EAN and UPC family of codes) as well as 2d codes. For other symbologies, see Calculating symbol counts for variable-length symbologies.

Change the barcode length

Changing the length of the barcodes is done through activeSymbolCounts on the symbology settings object. Following an example of changing for Code 128 barcodes the symbol count range (4-20).

Var symbolcounts = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
settings.getSymbologySettings(Scandit.Barcode.Symbology.CODE128).activeSymbolCounts = symbolcounts;

Available since SDK version 4.11.0.