> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search constraints

> Define an absolute search area on the Search Constraints tab in FlexiLayout Studio: page ranges, region coordinates, excluded elements, and vertical text.

Search areas are specified on the **Search Constraints** tab in the **Properties** dialog box, which is displayed whenever you create a new element.

To open the **Properties** dialog box of an existing element, do one of the following:

* Right-click the element in the **FlexiLayout** tree and select **Properties...** on the shortcut menu.
* Double-click the element in the **FlexiLayout** tree.

<Frame>
  <img src="https://mintcdn.com/abbyy/lqYknuOmCa79141v/images/flexi-capture/fls/Search_cons_tab.gif?s=31fc3c28deee81352c01eb0d10e9f5d8" alt="Screenshot of the Search Constraints tab of the element Properties dialog box in ABBYY FlexiLayout Studio, showing the search area and constraint options." width="427" height="454" data-path="images/flexi-capture/fls/Search_cons_tab.gif" />
</Frame>

## Specify the absolute coordinates of a search area

Open the **Properties** dialog box for an element, click the **Search Constraints** tab, and select the **Absolute search area constraints** option.

For a multi-page document, you can specify the pages on which to search for an element by selecting one of the following five options from the **Pages** drop-down list: **All**, **Even**, **Odd**, **Last**, or **Range**. If you select **Range**, enter the numbers of the pages, separating them with commas, and specify a page range using a hyphen: `2, 4, 6-8, 15`.

You can define the absolute coordinates of a search area in the **Region** field. Enter the coordinates in the format `[left, top, right, bottom]`. You can specify the coordinates of several rectangles in this field.

Use the **Measure** tool to determine the absolute coordinates of objects.

Once you have specified the properties of the search area, click **Add...**. The search area appears in the **Search areas** list. To edit a search area, enter the values in the **Pages** list or in the **Region** field and click **Replace**. If the **Region** field is empty, FlexiLayout Studio searches for the element across the entire page range.

## Exclude an element from the search area

The **Exclude regions of elements** property lets you exclude from the search area the region of the hypothesis found for an element. If no hypothesis for an excluded element is generated, this constraint does not affect the search area of the element.

<Note>
  An exception occurs when additional constraints are specified for some of the boundaries of the hypothesis for an excluded element in the **Advanced pre-search relations** pane. In this case, if the program fails to find the excluded element, it cuts out the rectangular search area of this element from the surrounding search area. For more information about internal rectangles, see [Fuzzy rectangle](/flexi-capture/fls/language/fuzzy-rect).
</Note>

To exclude an element's region from the search area, click the **Add...** button next to **Exclude regions of elements**. In the **Select Element to Exclude** dialog box, select the element whose region must be excluded from the search area.

## Recognize vertical text

For the **Currency**, **Date**, **Phone**, **Character String**, **Static Text**, and **Paragraph** elements, the **Search through vertical text** option is available. It enables recognition of both horizontally and vertically oriented text.

<Note>
  Vertically oriented text is a line of text that has been rotated 90 degrees left or right. Text fragments where the letters are placed one under the other but retain their normal reading orientation are not detected as vertical.
</Note>

The following example shows a line of vertically oriented text detected by a **Static Text** element.

<Frame>
  <img src="https://mintcdn.com/abbyy/8aWHPAJyzWmTqglX/images/flexi-capture/fls/verttext_sample.PNG?fit=max&auto=format&n=8aWHPAJyzWmTqglX&q=85&s=05d9a96e5c3d1848edce147da14fa629" alt="Screenshot of the FlexiLayout Studio Image window showing a StaticText element matched on a line of vertically-oriented text reading VERTICAL TEXT that has been rotated 90 degrees, alongside non-vertical text that is not detected." width="618" height="674" data-path="images/flexi-capture/fls/verttext_sample.PNG" />
</Frame>

You can use the **Clockwise oriented** and **Counterclockwise oriented** options to enable or disable the recognition of vertical text from top to bottom and from bottom to top respectively. These are enabled by default and can only be disabled if **Search through vertical text** is selected.

<Frame>
  <img src="https://mintcdn.com/abbyy/8aWHPAJyzWmTqglX/images/flexi-capture/fls/vertical_text.PNG?fit=max&auto=format&n=8aWHPAJyzWmTqglX&q=85&s=35c8fd7f0986bb9bbab7d82f4fae4e98" alt="Screenshot of the Search Constraints tab of the element Properties dialog box, where the Search through vertical text option is selected with its Clockwise oriented and Counterclockwise oriented suboptions enabled." width="427" height="454" data-path="images/flexi-capture/fls/vertical_text.PNG" />
</Frame>

## Related topics

* [Relative search area](/flexi-capture/fls/template/relations)
* [Additional search constraints](/flexi-capture/fls/template/advanced-constraints)
