Skip to main content
After you analyze the images, you will notice that the name of the Unit Price column can be described by the search text UnitPrice, Price, and RATE, and that the name Unit appears as Unit. To prevent FlexiLayout Studio from detecting the word Unit in the name of the Unit Price column, first describe Unit Price, because it contains unique text, and then use an additional relation to describe Unit. When creating an element to search for the keywords of the Unit Price column name, take into account that the Unit Price column is always to the right of the Quantity column.

Create the kwUnitPrice element

1

Create the Static Text element

In the TableHeader element, create a Static Text element and name it kwUnitPrice.
2

Enter the search text

Click the Static Text tab. In the Search text field, type UnitPrice|Price|RATE.
3

Add position relations

To place this name on the same level as the Designation name, click the Relations tab and specify the additional constraints described in Step 7.2.
4

Constrain to the X coordinate

On the Relations tab, specify this condition: search for an element closest to the X coordinate with value 0.
Screenshot of the Relations tab of the kwUnitPrice Static Text element properties in ABBYY FlexiLayout Studio, showing the constraint to search for an element closest to the X coordinate with a value of 0.
5

Add a pre-search condition

Because the name of the Unit Price column is to the right of the kwQuantity column name, click the Advanced tab and specify this condition in Advanced pre-search relations: if the kwQuantity element is detected, search for the image object to the right of it. In the FlexiLayout language:
6

Skip the search when Designation is missing

To optimize the search, do not search for the name if the Designation name is not detected, as described in Step 7.2.
7

Add post-search relations

Influence the quality of the generated hypotheses with an additional check in the Advanced post-search relations field: if the element is detected, calculate the difference between the reference width and the width of the detected element, and check whether it belongs to the given fuzzy interval. In the FlexiLayout language:
8

Match the FlexiLayout

Match the FlexiLayout to confirm that the element is detected on the first page of the document.