Barcode Scan

The Barcode Scan task is used to convert barcode data from multiple image formats into text-readable information. This information is placed in the Metadata and can be used by the rest of the process.

Input

Image formats supported by the Barcode Scan task are:

  • Tag Image File Format (TIFF)
  • Portable Document Format (PDF)
  • Joint Photographic Experts Group (JPEG and JPG)
  • Portable Network Graphics (PNG)
  • Bitmap (BMP)

Processing

The task reads the image and detects the presence of the selected supported barcode types. When a barcode is detected, the data it contains is read and added to the Data Page level of the Metadata.

Note: This task does not recognize more than one level of the Metadata Document. This means that if you are intending to define separate documents, you should use the Metadata Level Creation task after the Barcode Scan.

Output

This task outputs the original data file but with modified (or created) Metadata. The format should be the same as the input.

Supported barcode types

The following types of barcodes are supported:

Barcode types

Description

EAN13

EAN13 symbology. Used with consumer products internationally, 13 characters.

EAN8

EAN8 symbology. Short version of EAN-13, 8 characters.

UPCA

UPCA symbology. Used with consumer products in U.S., 12 characters.

UPCE

UPCE symbology. Short version of UPC symbol, 6 characters.

Code11

Code 11 symbology. Used to identify telecommunications equipment

Code39

Code 39 symbology. U.S. Government and military use, required for DoD applications

Code93

Code 93 symbology. Compressed form of Code 39.

Code128

Code128 symbology. Very dense code, used extensively worldwide.

Codabar

Codabar symbology. Used in libraries and blood banks.

Inter2of5

Interleaved 2 of 5 symbology. Used in warehouse, industrial applications.

Add2

2 additional digits code for UPC-based symbologies. Used to indicate magazines and newspaper issue numbers.

Add5

5 additional digits code for UPC-based symbologies. Used to mark suggested retail price of books.

PDF417

Portable Data File is a 2-dimensional barcode (also known as matrix code) used in a variety of applications, including Transport, Identification cards, and Inventory management. It is best suited for cases where information needs to move with an item or document.

DataMatrix

DataMatrix is a two-dimensional barcode which can store from 1 to about 2,000 characters. DataMatrix is being used to encode product and serial number information on electrical rating plates; to mark of surgical instruments in Japan; to identify lenses, circuit boards, and other items during manufacturing.

QRCode

The QR Code (Quick Response Code) is a 2-dimensional matrix code. It can encode up to 2509 numeric or 1520 alphanumeric characters.

PostNet

PostNet symbology. Used by the United States Postal Service to assist in directing mail.

RM4SCC

RM4SCC symbology. Used by the Royal Mail.

Note: The fewer barcode types are selected, the faster the plugin performs. Selecting only the expected barcodes is therefore a good practice.

Barcode orientations

Barcode orientations represent a barcode orientation on an image. For example, when the left-to-right option is checked, the task will try to read the barcode value assuming that the barcode data should be read in a left-to-right fashion.

Note: The fewer orientations are selected, the faster the task performs.

Settings

  • Force checksum validation: Select to define whether the checksum validation is required for symbologies in which a checksum character is optional. The goal of checksum is to detect accidental modification such as corruption to stored data or errors in a barcode values. By default it is set to false. Note: If barcodes using symbologies with optional checksum do not show the checksum and the option Force checksum validation is checked, no barcode will be detected on the page
  • Process by: Select to define whether to process the image by page or by file:
    • Process by Page: The task is able to handle single or multiple page files (Tiff and PDF) and act as a loop to process each page independently and sequentially. The Metadata file will be created separately for each page if it does not exist or will be enhanced with the values on processed Datapage level if it already exists. All supported images will be converted to tiff format.
    • Process by File: The task will process the file once and will insert the barcode information in one Metadata file. Metadata will be created if it does not exist or will be enhanced with the values if it already exists.
  • Replace non-printable character with: Enter a character that will be used as a replacement for all non-printable characters read from the barcode.Some barcode types like Data Matrix can store non-printable characters that Metadata does not support. The Barcode Scan task character replacement option will allow successful barcode reading of all non-printable characters in a given barcode. The value specified in the Replace non-printable character with option will be found in place of any non-printable character in the BarcodeValue and Barcode_x_Value Metadata fields, while the original barcode value (i.e. with non-printable characters) will be available in the BarcodeBase64_x_value Metadata field. This option allows only one printable replacement character. By default, this character is an empty space. Note: Non-printable characters are the first 32 characters in ASCII character table (Ex.: form-feed, newline, carriage return characters)
  • Scan Interval: Set a scan interval in pixels of image scanning. This property directly affects the performance and quality of the recognition. A greater interval value means better performance, but a lower recognition confidence level, and vice versa. For example, a value of 1 means that every image line will be scanned. By default, the Scan Interval is set to 1.
  • Threshold level [0..255]: Set to represent the color threshold level in order to distinguish foreground pixels from background pixels in color or gray scale images. Value can be between 0 and 255, corresponding to the pixel intensity value, from 0 (black) to 255 (white). Therefore, defining a threshold value of 128 means that the pixels with an intensity greater than 128 will be considered as white, while those less than 128 will be considered black. The value 0 means that the color threshold level will be calculated automatically depending on the image. By default Threshold level [0..255] is 0. This parameter is ignored with binary images (black and white images).

On Error Tab

For a description of the options on the On Error tab see Using the On Error tab.

Miscellaneous Tab

The Miscellaneous tab is common to all tasks.

It contains a text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button and are displayed in The Task Comments Pane.

Check the option Use as step description to display the text next to the icon of the plugin in the Process area.

The tab also provides an option to highlight the task in The Process area with the default color, set in the Preferences (see Colors), or the color selected or defined under Highlight color on this tab.
To revert the selected highlight color to the default color, open this tab, turn the Highlight option off and close the dialog with the OK button; then turn highlighting back on.
Highlighting can also be turned on and off via the task's contextual menu and with the Highlight button on the View ribbon.

Metadata implementation

The Barcode Scan task reads each scanned file and outputs the values read from barcode(s) on the page(s) into Metadata depending of the selected Process by option:

  • If the selected option is process by page, then the Metadata file is created and overwritten for each new scanned page.
  • If the selected option is process by file, then only one Metadata file will be created (or updated).

Note: If Metadata was created previously in the process, the task only adds new fields to the existing Metadata at the datapage level.

Metadata fields

The barcode values are stored at the datapage level of the Metadata. In the following definitions, the first 2 Metadata fields are for standard use, while the next 8 fields contain '_1_' in their name. This number represents the barcode index on the page. If there is more than one barcode on the same page, these Metadata fields will be defined as many times as there are barcodes on the page, except that the middle number (..._X_...) will increment according to the barcode index (e.g. Barcode_2_Value, Barcode_3_Value, etc.).

  • BarcodeValue: Metadata field representing the value of the barcode. When multiple barcodes are present on the page, this field is present multiple times.
  • BarcodeCount:: Metadata field representing the number of barcodes on the page.
  • Barcode_1_Value: Metadata field representing the value of the first barcode on the page. Note that this field (Barcode_1_Value) contains the same value as the first occurrence of BarcodeValue.
  • BarcodeBase64_1_Value: Metadata field containing the value of the first barcode, encoded in Base64.
  • Barcode_1_Type: Metadata field containing the type of the first barcode (ex. EAN13, UPCA …).
  • Barcode_1_Orientation: Metadata field containing the orientation of the first barcode.
  • Barcode_1_Top: Metadata field providing the distance (in pixels) from the top of the page to the top of the first barcode.
  • Barcode_1_Bottom: Metadata field providing the distance (in pixels) from the top of the page to the bottom of the first barcode.
  • Barcode_1_Left: Metadata field providing the distance (in pixels) from the left of the page to the left side part of the first barcode.
  • Barcode_1_Right: Metadata field providing the distance (in pixels) from the left of the page to the right side part of the first barcode.

Accessing a barcode value from the Workflow tool

One method to access a barcode value from the Workflow configuration tool is to use a VBScript with the Open Script task, using the Watch.ExpandString command with a Metadata command as its input parameter, in between double quotes. For example, the following script line gives the value of the first BarcodeValue Metadata field of the first datapage:

watch.expandstring("GetMeta(BarcodeValue[0],0,Job.Group[0].Document[0].Datapage[0])")

Another method is to use a Set Job Infos and Variables task to copy a Metadata field into a Workflow variable.

Limitations

  • Some barcodes created with PlanetPress 5 could not be read by the Barcode Scan task, so please use PlanetPress version 6 or 7 to create barcoded documents.
  • When using a secondary input, a known issue of the Workflow Tool can cause some unexpected behavior, like having the same Metadata file reused instead of a new one being created for each data file captured. To work around this issue, simply add a Rename action task to set a unique file name (Ex. %u) to each new file before the Barcode Scan task, after each secondary input.