- In the CompanyGroup element, create an element of type Static Text and name it Company.
- Click the Static Text tab.
- Select Search text from file and specify the path to the
Companies.txtfile (folder%public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice\Dict).

- Click the Advanced tab.
-
In Advanced pre-search relations, specify an additional search constraint: Search for the image object in the first third of the first page of the document. In the FlexiLayout language, this constraint can be written as follows:
- Match the FlexiLayout to make sure that it reliably detects the element on all the images where it occurs.
-
When you review the matching results, you will notice that the program failed to find the name of the company on some of the documents. This is because on some of the documents the text is written on two lines, whereas one-line text was specified in the properties of the element. To correct this, make the following changes:
- Open the
Companies.txtfile and specify the company name as YOUR SERVICE with spaces. This means that the program will look for a phrase that may span more than one line. - Open the Properties dialog box of the Company element and click the Static Text tab.
- Select Permit multiple lines to specify that the phrase can be written on more than one line.
- Set Line break penalty to 1. This will retain the quality of the generated hypothesis even if the text is written on more than one line. A smaller value would mean that the hypothesis should be penalized.
- Open the
- Match the FlexiLayout to make sure that the program reliably detects the element on the test images.
-
Specify the location of the Company block as the rectangular region of the Company element expanded by 5 dots vertically and horizontally. To do this, select Expression and specify the following expression:
