Sample 1. Step 19: Describing the ANY TEXT field
The field located at the bottom of the document has no fixed name. Therefore, objects other than names must be used to locate this field. We will assume that each ANY TEXT field has its own unique name.
First, try using the already created IdentityNumber element to look for the ANY TEXT field, because on all the test images the ANY TEXT field is located below this element.
Note.Do not use separators that are present on some images, as those are not regular and reliable elements. See Step 6.
To use the IdentityNumber element to find the object corresponding to the ANY TEXT field:
- Create an element of type Paragraph and name it TextField. This element will correspond to the ANY TEXT field.
- On the Relations tab, describe the location of the TextField element as Below the IdentityNumber element.
Try finding the ANY TEXT field using the IdentityNumber element. You will see that on some images the hypothesis will also include barcode digits. Therefore, you need to describe the location of the ANY TEXT field more precisely.
Create a White Gap element with horizontal orientation. This element will correspond to the gap between the text and the barcode. This element will be used as a reference element when looking for the ANY TEXT field.
Be sure to place the White Gap element above the TextField element in the tree of elements.
- Create an element of type White Gap and name it BetweenGap.
- On the White Gap tab, select Horizontal as the orientation of the BetweenGap.
Show me...
- On the Relations tab, specify the search area for the BetweenGap element as an area below the IdentityNumber element but no further than 200 dots from the bottom boundary of the BarcodeHeader element.
Show me...
- Create an element of type Paragraph and name it TextField.
- On the Relations tab, describe the location of the TextField element as Below the BetweenGap element, Offset =0.
Try matching the FlexiLayout with all the test images. You will see that the formulated hypothesis about the TextField element does not contain any unwanted data. This means that the BetweenGap element can be used to detect the TextField element.
To describe the location of the block corresponding to the ANY TEXT field, create a block of type Text, name it TextField and specify the TextField element as the source element.
12.04.2024 18:16:02