Setup Zoned Barcodes dialog box

This dialog box allows you to set up zones in which the Barcode component will search for barcodes.

To open the Setup Zoned Barcodes dialog box, click the Add or Setup button on the General tab.

In the Setup Zoned Barcodes dialog box, you can load an image file, navigate through multiple page image file, draw zones around barcodes in images and set options for each zone. When you define zones, the Barcode component ignores barcodes outside of the zones. This allows documents to be processed more efficiently. While you work in this dialog box, the status area at the right-top of the dialog box shows the number of zones applied to the image, the number of zones on the selected page.

Preview buttons

Buttons on the zone editor toolbar are used for previewing input images in the image pane.

Button Description
This zoom controls may be used for zooming the image in/out.
Use these buttons to set up image alignment: fit to screen, fit to width, fit to height.
Use this button to enter selection mode, in which you can select one or more zones.
Use this button to enter creation mode, in which you can create new zones.
Use this button to remove selected zones.

Preview Pane

The image pane displays the image for preview. Click and drag to draw zones around barcodes. You can include one or more barcodes in a scan. A zone should be at least slightly larger than barcode images that you want to include in it. You want to be careful to allow sufficient space for variation in positioning that can occur between images. Deskewing and preprocessing can also shift barcodes a little. To be detected by the Barcode component during processing, barcodes should fit completely into a zone.

Image

The options in this group allow you to select an image and a page for displaying in the preview pane.

Option Description
Image file The path to the image file. Click the browse button (...) to locate an image.
Page Enter a page number to a page in a multipage image file. You can use backward and forward buttons to navigate between pages. These buttons are enabled only if a document contains more than one page.
The color depth for displaying the PDF image in the preview pane is the maximum from the OCR color depth and the Split color depth values that are set on the Advanced tab (see Advanced tab).

When an 8 bit gray scaled JPEG document is used, the image is opened in 24bpp mode to eliminate dithering.

Zone

This group contains the options for a selected zone.

Option Description
Zone This box specifies the index number for the zone you want to configure. You can enter the index number of a zone in this box or click the zone in the image pane to select it.
Require exactly one barcode in the zone If this check box is selected, the component tries to detect exactly one barcode in the zone. This option can be useful if the quality of printed barcodes is low, or if the Barcode Type option is set to Autodetect. If there are either no barcodes in a zone or more that one barcode in a zone, the zone will be skipped.
Add barcodes to global set Add barcodes found within the zone to the global set. The values of the barcodes from the global set can be retrieved using global set RRTs (see Barcode global set RRTs).
Add barcodes to set Select this check box to add barcodes found in the zone to a named set of barcodes. A named set can contain barcodes found in one or several zones. The barcode values found in the set can be retrieved using named set RRTs (see Barcode named set RRTs). If no name is provided, then the barcodes found within the zone are added to the global set.
If neither the Add barcodes to global set nor the Add barcodes to set option is selected, then zone barcodes are not added to either named or unnamed (global) RRT, although they are still recognized and validated.

Pages tab

This tab contains options to specify on which pages the component should search for the specified zone.

Option Description
Recognize zone on all pages The component will look for barcodes in the zone on all pages of the document. This option is set by default.
Recognize zone on odd pages only Barcodes in the zone will be looked for only on odd pages of the document.
Recognize zone on even pages only The zone will be recognized only on even pages of the document.
Recognize zone on pages with numbers The component will recognize the zone on particular pages of the document. When this property is selected, the text field is enabled and the user should specify the numbers of pages to recognize. It can be, for example, 2,4,6..9,11.. To specify a range, use ... When .. is specified at the end, it means "and till the last page". The value none means that the zone will not be recognized; all means that the zone will be recognized on all pages of documents.
And on the last page This check box is enabled only if the Recognize zone on pages with numbers option is chosen. If this check box is selected, the zone will be recognized on the defined pages and on the last page of the document.

Validation tab

Use options on this tab to require validation of the values of the found barcodes. The barcodes whose values do not satisfy the validation criteria will be ignored.

Select the type of validation from the drop down list:

  • No validation: this option is set by default. Barcode values are not validated.
  • Wildcard: this option allows using wildcard characters to validate barcode values.
    Wildcard Description
    * Any value of any length.
    ? Any single character.
    [A] Any single alphabetic character.
    [#] Any single numeric character.
    [A#], [#A] Any letter or number.
    If you want such symbols as * ? [ ] \ to be recognized as characters (not as wildcard characters), use combinations with slash: \*, \?, \[, \], \\. For example, if a string [a*b]*c is desired to be found, use the following expression: \[a\*b\]\*c.
  • Regular expression: this option requires barcode values to match a regular expression. For matching regular expressions, the component uses the ECMAScript grammar. For more information about ECMAScript grammar, see Regular Expressions in the MSDN Library or the official website.
  • External script: this option means that zones will be verified using a VB script. Enter the path to the script in the Script file name box or click the browse button (...) to locate the script file. The script receives the following data:
    • sValue: the zone value.
    • sFileName: the input file name.
    • nPageNumber: the page number.

If the zone is successfully validated, the script must return the "TRUE" or "YES" value in the string variable RRV. If validation fails, the script returns "FALSE" for RRV.

Option Description
Zone is required Select this check box to reject a document if no value is found within this zone (or no value matches validation criteria when validation is on), or if the external script returns "FALSE".
Use default value if not found or invalid Select this check box to specify a default value for a barcode when its value is not valid according to the chosen validation method.

Location tab

On this tab you can modify the selected zone coordinates and preferable measure unit.

Option Description
Left Modify the left coordinate of the zone.
Top Modify the top coordinate of the zone.
Right Modify the right coordinate of the zone.
Bottom Modify the bottom coordinate of the zone.
Units type Set the units which are used to represent the coordinates of the zone. If you specify the type of units, the coordinates are recalculated and the zone is stored in the same place. You can select one of the following values:
  • Millimeters
  • Inches/100