Define search areas for elements by specifying regions on document images where the program should look for objects, using absolute coordinates or relations to anchor elements.A search area is a region on the image where the program should look for objects corresponding to a specific element. It is calculated based on the conditions specified in the Where to search section of the Properties pane.On semi-structured documents, some objects may appear in different locations on different documents, and so the program will not always be able to find them using absolute search areas. In this case, search areas can be defined relative to elements with permanent locations, or relative to fields that have already been found. There are also cases where an element can be detected without defining a search area (e.g. a Static Text element always containing some document-unique word can be detected based on that word alone) or by limiting the search area just to the first or the last page of a document.
Create and set up so-called anchor elements. Any elements that have already been detected can be used as anchor elements, provided you can define some relations between them and the element you want the program to detect. Match the elements against your image using the Match command and make sure they are detected correctly.
Create an element corresponding to the image object you want to detect and specify its properties in the What to search for section.
Specify search area in the Where to search section. a. In the Search on drop-down list, select Whole Document if you need to search the whole document, or First Page or Last Page if you need to restrict your search to the first or last pages. When specifying the search area in this manner, no anchor elements are required. b. If required, specify relations existing between the element to be detected and other elements or draw a search area directly on the image. You can specify search area boundaries in relation to other elements, exclude certain elements from the search area, or specify which element or page edge is nearest to the element to be detected.
Click Match to make sure that your element can be detected correctly on all the documents.
In most cases you will specify a search area relative to the location of other search elements used as anchors. You can only use an element as an anchor if it was successfully found on the image, so you should first set up and match elements that will be used as anchors.Click the Draw on Image button and draw a search area on your image. The search area should be close to or intersecting with the regions of the anchor elements. In the Where to search section, the Right of, Below, Left of, and Above properties will appear for the search area you have drawn, as well as coordinates to specify distances for those properties in relation to the search area and anchor elements. These properties are synchronized with the search area on the image. You can modify the search area at any time by either editing the area on the image or changing the relation properties in the Properties pane. When you select a relation in the Properties pane, the half-plane specified by this relation is highlighted on the document image.Next, adjust relations for the anchor elements and the search area using the anchor element toolbar, which can be accessed by clicking an element’s region:
The directional arrow tools can be used to enable and disable object search relations relative to the element in the corresponding direction.
The delete relations tool removes all relations set for the selected element.
The nearest tool specifies that among all element hypotheses, the one nearest to the selected element should be considered if all other conditions are satisfied equally. When hypotheses are formulated, the object nearest to the selected element will be chosen. If this tool is used, the Nearest to property appears on the Properties pane. This property can be set for only one anchor element.
The exclude tool excludes the selected element from the search area. It is used when an element inside the search area may be mistaken for the object being searched for. For example, if you are looking for a Character String element with a character set, a different Character String element with the same or similar character set can be chosen by mistake. To prevent this from happening, exclude the second element from the search area using the exclude tool. When you use this tool, the Exclude property appears in the Properties pane.
When you are finished setting up the search area, click the Draw on Image button to exit the Draw Search Area mode.
These relations are equivalent to the ones configured using the anchor element toolbar described above. You can edit each relation separately.If you switch on the Draw Search Area mode, the search area and the half-plane defined by the selected relation will be displayed on the document image. The search area will be synchronized with the relation properties.
In the Where to search section, click Add and select the relation type you wish to configure. In the dialog box that opens, select an anchor element. You can select any active element above the current element.You can add multiple relations of each of these types.You can modify the search area by changing the offset for the Right of, Below, Left of, and Above relations. A positive offset value means that the boundary will be moved in the same direction as specified in the relation. A negative offset value moves the boundary in the direction opposite to the direction specified in the relation. For example, a negative offset for the Right of relation will move the boundary to the left.You can also select the element boundary from which the search area will be calculated. By default, the boundary is selected in such a way as not to include the anchor element in the search area (above the top boundary, below the bottom boundary, etc.). You can also calculate the search area from the opposite boundary of the anchor element (above the bottom boundary, below the top boundary, etc.) or from its center. To adjust this setting, click the boundary icon displayed for the appropriate relation.
Suppose that you need to find a specific sequence of characters that is above some predefined static text on some documents and level with that static text on others. Setting the Above value to 0 will not have the search area consider elements level with the static text, meaning that your element will not be in the search area on some images:However, setting the Above value to -50 or clicking the boundary icon and selecting the Bottom Boundary of Region will include both the area level with the static text and the area above it, which guarantees that your element will be inside the search area on all images:
When setting this relation in the Properties pane, you can select either a search element or one of the page edges as an anchor. This is the only relation that you can set for the first element in the tree. You can add only one relation of this type. You cannot add this relation for Group and Repeating Group elements, but you can add it for child elements of a group or a repeating group.
Using a Repeating Group Element as an Anchor Element
When you select an anchor element for a relation, you will see that Repeating Group elements and their child elements are always grayed out. However, you can use these elements as anchor elements. To set up a relation with a Repeating Group element, click the edit dropdown icon to the right of the element name and select the instance that will serve as an anchor element. You can specify the last found instance, all completed instances or an instance with a certain number.
You can change the anchor element for any existing relation by double-clicking the relation on the Properties pane. The offset and boundary settings will be preserved.Existing relations can be deleted both using the anchor element pane and the delete button next to the appropriate property in Properties pane.To delete a search area, click the delete relations icon on the search area. Alternatively, select Whole Document, First Page, or Last Page in the Search on property.