Skip to main content
The FlexiLayout language provides global functions for math and comparison operations, coordinate and interval calculations, string processing, conversion and validation, database and file access, page and document handling, and pre-recognition.
Do not use variables as arguments of global functions that interact with external files or databases.

Math and comparison functions

Coordinate and interval functions

String functions

Conversion and validation functions

Example for StrToInt:
Example for ValidateByDB:
Example for ValidateByFile:
Example for ValidateByText:
Example for StrToReal:

Database and file functions

Example for ExecuteSQL:
Example for WriteToFile:
Example for Record:
In this example, a search string SearchText and coordinates of rectangles for the search area LeftPos, TopPos, RightPos, BottomPos are extracted from the SearchPositions table. The value of the SearchText field is combined into a search string by using the | operator. The LeftPos, TopPos, RightPos, and BottomPos coordinates from the table fields are used to generate coordinates in dots for the rectangles. Generated coordinates are added to the search area of the DocID element.

Page and document functions

Example for SetPagesCount: If the given element was matched, the document ends on the next page:
The number of pages in the document can be seen in the PageNum field:

Pre-recognition functions

The following functions invoke pre-recognition during FlexiLayout matching. The text lines intersecting with a given pre-recognition area are recognized as a whole (including the line parts that fall out of the area boundaries).