Add a region to a locator

If you know that a piece of extracted content always appears in a specific location on a document, you can restrict the parts of a document that are searched to a specific area. For example, if you know that a unique customer number is always listed at the top of the first page of a document, rather than searching the whole document with your locator, you can restrict it to search to the top portion of the first page only.

Tip You can use the table values for any added region to resize or reposition it on the document. The best practice however, is to use the Document Viewer to resize and reposition your region. This is because it is much easier to view the location than estimate it based on percentages and other measurements.

You can add a region to a locator by following these steps:

  1. Expand the Project Tree and select the class that contains the locator.
  2. Optionally, view the class contents if they are not already displayed.

    The hidden class contents are displayed.

  3. Open the locator properties.
  4. Click the Regions tab.
  5. In the Enable locator for group, select one of the following options:
    • All pages

    • First page

    • Middle pages

    • Last page

    This option is independent from the individual regions, so you should modify this option only if you want to restrict the locator and all regions to a specific page or pages. If you are extracting data from a multi-page document, the best practice is to use the "All pages" default value.

    The selected value for this field restricts the locator to search the selected page or pages only. This value is independent of the Page value for the region specified later. That value restricts the region itself to a specific page.

  6. Select an Access value.

    If you select the "Outside the regions" option, the locator ignores the drawn region and all content within that region. This is the default value for this option. However, it is far more common to restrict a locator to search within a specific region by selecting the "Inside the regions" value.

  7. Click Add.

    A new region is added to the table with default values for position, width and height.

  8. Optionally, double-click the name of your new region, type a new descriptive name, and press Enter.

    The name of the region is updated.

  9. Optionally, select a value for the Page column.

    The selected value restricts the region to a specific page or pages. If "All" is selected, the region is duplicated on all pages of the document and searched. As a result, if you have a multi-page document, the best practice is to restrict the region using a value from this list. If this is not possible, use the default value.

    Note The value here cannot conflict with the "Enable locator for" value specified in step 5. For example, you cannot restrict the locator to the first page and then set the Page value to "Last".
  10. Ensure that your newly added region is selected in the table and then reposition and resize that region by following these steps:
    1. Open a document with the appropriate content and page count in the Document Viewer.

      A grey box with a green outline is in the upper left corner of the document. If you selected a specific page, the region may not be on the first page.

    2. To reposition the region, click on the grey box and drag it to the appropriate location on that page.
    3. To resize the region, click one the green handles and drag one or more of them in turn, until you have the required region size.

      You can use the values in the regions table to modify the size and position of the region. However, the best practice is to use your mouse and the Document Viewer. It is easier to visualize and reposition a zone with your mouse. It also ensures that you do not need to know the precise measurements of your data and their location on your pages.

    Optionally, add additional regions as required.

  11. Open a test document and click Test to test your settings.
  12. Click Close to close the locator properties window.
  13. Save the changes to your project.