Sample 3. Step 15: Analyzing the search constraints for column names with a TableHeader element of type Group
Analysis of the test images reveals that the column names are located directly below the previously detected horizontal separator. To specify the search constraints common to all the column names, we need to create a Group element — TableHeader.
To create the TableHeader element:
- Create a Group element and name it TableHeader.
- Click the Advanced tab.
- You will have noticed that if the hsTableHeaderTop separator has been detected on an image, the column names are located below the separator, but no lower than 100 dots from it. Otherwise, they are located in the top three fifths of the page. So set the following additional search constraint in the Advanced pre-search relations field: If the hsTableHeaderTop element has been detected, look for the objects of the image below the separator but no lower than 100 dots from it. Otherwise, look for the objects of the image in the top three fifths of the page. In the FlexiLayout language:
If Not (hsTableHeaderTop.IsNull) Then
{
Below: hsTableHeaderTop, 0 * dot;
Above: hsTableHeaderTop.Bottom, -100 * dot;
} Else
{
Above: PageRect.Top + PageRect.Height*3/5;
}
12.04.2024 18:16:02