Skip to main content
The table header begins with a horizontal separator above the column names. Create a Separator element to detect it and restrict the search areas of the column names.
1

Create the Separator element

Create an element of type Separator and name it hsTableHeaderTop.
2

Configure the separator

Click the Separator tab and set these values:
  • In the Orientation group, select Horizontal.
  • Set Min length / Max length to 1500 / 2500.
  • Select Fits entirely within search area.
  • Under Space, set Max length to 20 and Orthogonal shift to 20.
Leave the default values for the other parameters.
Before you set the separator length, analyze the geometrical properties (size and boundaries) of the neighboring objects detected during pre-recognition. Separator error thresholds are selected by trial and error.
Screenshot of the Separator tab of the Properties of SearchElements.hsTableHeaderTop dialog box in ABBYY FlexiLayout Studio, showing the Horizontal orientation selected, Min and Max length set to 1500 and 2500, and the Fits entirely within search area option enabled.
3

Set the search constraints

Click the Relations tab. The separator occurs only below the keywords of the kwInvoiceDate and kwInvoiceNumber names, so set these constraints:
  • Below the InvoiceHeader.kwInvoiceDate element, Offset = 0
  • Below the InvoiceHeader.kwInvoiceNumber element, Offset = 0
4

Add the search constraint

Click the Advanced tab. The separator sits at the top of the described search area, so set this additional search constraint in the Advanced pre-search relations field: look for the object on the image nearest to its top boundary. In the FlexiLayout language:
You can also set the Nearest constraint via the FlexiLayout Studio graphical user interface. Click the Relations tab, select Nearest, and in the To drop-down list select Page top edge.
5

Verify the match

Match the FlexiLayout with the test images and confirm that FlexiLayout Studio detects the element on every image.