Sample 3. Step 11: Detecting the right border of the Delivery Address field with a wgAddressRight element
To specify the right boundary of the search area of the DeliveryAddress element, we need to describe the corresponding vertical white gap.
To create the wgAddressRight element:
- In the InvoiceHeader.grAddress element, create an element of type White Gap nd name it wgAddressRight.
- Click the White Gap tab.
- In the Orientation group, choose Vertical. Set Min width to 100.
Note.Prior to setting values for height or width of white gaps, you may want to analyze the geometrical properties (i.e. size and boundaries) of the neighboring objects detected during pre-recognition. Values for the noise threshold in the white gap area are selected by trial and error.
- Set Lower threshold limit: and Threshold coefficient (%): to 10.
Note.The values of Lower threshold limit, Upper threshold limit, and Threshold coefficient (%) are selected by method of trial and error.
For more information, see White Gap.
- Leave the default values for the other parameters of the element.
- Click the Relations tab.
- Since the sought white gap can only be located to the right of the keywords of the name kwDeliveryAddress, set the following search constraint:
- Right of the element kwDeliveryAddress, Offset = 0
If InvoiceHeader.kwDeliveryAddress.IsNull Then DontFind;
Note.The Nearest constraint can also be specified via the program’s graphical user interface. Click the Relations tab, select Nearest, and in the To: drop-down list select Element and specify kwInvoiceNumber as the Reference element.
5/25/2023 7:55:03 AM