Read Bar Code

From PresenceWiki
Revision as of 12:09, 25 August 2015 by Mattpryor (Talk | contribs)

Jump to: navigation, search

The Read Bar Code Node scans a given PDF or TIFF document for barcode images and attempts to retrieve the values encoded in them.

Basic Options

Here is what the first tab on the dialog box looks like when dragged into your Task:

Read barcode dialog 1.png

Barcode Format

Select from one of three options:

  • Automatically Detect
  • Fixed Format
  • Dynamic Format

Automatically Detect: If "Automatically Detect" is enabled, the scanner will attempt all known barcode formats until it finds one which can be used to read any barcode found in the source document. This option may be slower than other options. Fixed Format: This option allows you to specify what format is expected by selecting from a drop-down list, which will be faster than attempting all supported formats. Dynamic Format: Allows you to enter the expected format into a text field, which can also contain dynamic values to be parsed at runtime, e.g. variables, data table values or function calls. If the value is taken from a column name then a separate scan will be performed for each unique value.

Generated Column Names

Two new columns will be created or appended to the existing datatable. One contains the textual value of any barcode found in the document, and the other the format of the barcode that was found. If no barcode is found these values will contain NULL. The textfields allow you to customise the column name that these values should appear under. If you don't want to change them, just use the default values.

Source File

This is the file location of the document to be scanned. If it contains a column reference (eg :var{FILELOCATION} ) then the operation will be repeated for each unique value. This allows you to pass in a list of files instead of just one file.

If you only wish to scan the first page of the document, check the "First Page Only" option.

The following file types are supported:

  • PDF
  • TIFF
  • PNG
  • JPEG
  • GIF

Advanced Options

This tab allows you to control how the document is scanned, and which parts of the document will be scanned to look for barcodes.

Read barcode dialog 2.png

Detect multiple bar codes per page

If this is selected, Presence will continue to look for more barcodes after detecting the first one on the page. Each new value found with a new format will be stored in a new row in the Data Table. Duplicate values will be discarded provided the barcode is the same format.


The barcode scan can work better when it is looking at a smaller section of the image, rather than the entire image. To accomplish this you can tell Presence to split the image up into a number of horizontal and vertical sections. At run time the image will be dissected into overlapping sections and each section will be scanned. Use the "horizontal sections" and "vertical sections" spinners to set the number of sections to use.

Preview Pane

This shows a preview of how the image will be split up. Optionally, you can load a preview of your document into this panel by clicking the "Load Preview" button to help you decide how many sections you need. You can also click the image to tell Presence to ignore certain sections. So if you know your barcode will appear in the top right of the image, you can click the other sections to remove them from consideration:

Read barcode dialog 3.png

If the preview is a multi-page PDF or TIFF document, the previous and next page buttons will be enabled to allow you flip between pages.

Test Panel

This allows you to test the barcode scanner and view the results. Click the "Start Test" button to scan the document specified in the "Basics" tab and output the results in the table.

Read barcode dialog 4.png

Task Elements : Action Task Elements : Read Bar Code

Send Email | Send SMS | Send Fax | Broadcast Messages
Read Text File | Read Binary File | Write Text File | Write Binary File | Parse File Action
Rename File | Copy File | Delete File | Parse File Action
Generate Bar Code | Read Bar Code
Dynamic Task Call | Call Native Program | FTP Upload | Scorecard Collector | Create Graph | AS400 Action
Socket Client Action | Socket Server Action
JMS Producer | JMS Consumer

Task Elements | Resources