> ## 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.

# Create a FlexiLayout

> Create a FlexiLayout step by step: build a project, add sample image batches, pre-recognize documents, define elements and blocks, and then compile and test.

A **FlexiLayout** is a formalized description of a set of unstructured documents which enables a data capture application to locate data fields on the documents and extract information from these fields.

For each object or group of objects which must be detected on a document image, a FlexiLayout [element](/flexi-capture/fls/template/elements) is created. The properties of the element describe the properties of the corresponding object. The element specifies whether the object to look for is a picture, a text fragment, or a barcode, how large it is, and where it is most likely to be found on a document image.

A FlexiLayout [block](/flexi-capture/fls/template/blocks) specifies where to look for objects from which data must be captured. Block coordinates may be specified directly or by means of elements.

ABBYY FlexiLayout Studio offers a user-friendly visual interface which allows you to create FlexiLayouts consisting of elements and blocks. However, FlexiLayout creation requires a certain degree of creativity, as the same object can often be detected in more than one way, and you must decide which detection strategy to use.

FlexiLayout creation consists of the following stages.

## Create a FlexiLayout Studio project

A **project** is a file which contains all the FlexiLayout data. It records the formalized description of the layout and is used for compiling and testing the FlexiLayout.

For more information, see [Projects](/flexi-capture/fls/project/project).

## Create a batch of document images

A **batch** is a set of sample document images which must be representative of the entire batch of documents which are to be processed.

For more information, see [Batches](/flexi-capture/fls/batch/general-batch).

## Pre-recognize the document images

Pre-recognition is a process whereby ABBYY FlexiLayout Studio detects atomic objects on an image, such as text fragments, separators, and check boxes. Pre-recognition gives you an idea of what you can look for on the documents in a batch.

For more information, see [Pre-recognition](/flexi-capture/fls/batch/prerecognition).

## Analyze pre-recognition results

Once a document has been pre-recognized, analyze it to find objects which can be reliably detected on all of the documents in the batch.

Here is what to look for:

* Objects which are located in exactly the same place on all of the documents (these can be logos, headers, titles, and similar objects)
* Objects which have been reliably recognized and which are present on all of the document images
* Objects which are almost unaffected by the quality of printing or scanning

If there is a sufficient number of such objects, you can describe the locations of all the other objects on the documents relative to these objects. At this stage you can also select the best way to look for a particular object on the document.

For more information, see [Analyze images](/flexi-capture/fls/batch/pre-analyze).

## Create FlexiLayout elements and blocks

First, create elements for objects which can be detected without resorting to other objects on the document (for example, a title or another text fragment which occurs on each document). Then describe the locations of the other objects relative to the elements you have already created. The FlexiLayout elements will form a tree of elements, from the most reliable objects to the least reliable.

If the document contains objects which distinguish one set of documents from the other sets, elements for such objects should be created first. These objects will be used as identifiers so that FlexiLayouts created for one set of documents are not matched with the documents from another set by mistake. This will speed up document processing and make data capture more reliable.

Only you can decide which elements and blocks must be created first. However, test the FlexiLayout after each new element or block is created to make sure that the new element can indeed be used to detect the object it describes on all of the sample images.

It can be useful to visually divide the document into several logical parts and sequentially describe image objects of each part. This will facilitate further debugging of the FlexiLayout.

For more information, see [FlexiLayouts](/flexi-capture/fls/template/ftemplate).

## Compile the FlexiLayout

When you build a FlexiLayout, ABBYY FlexiLayout Studio checks its logic and consistency.

For more information, see [Build a FlexiLayout](/flexi-capture/fls/settings/compile).

## Test the FlexiLayout

To test your FlexiLayout, try matching it with sample document images. The FlexiLayout must not only match all of the sample images, but also enable the data capture application to detect the corresponding objects correctly. Test your FlexiLayout after each new element or block is added to it. It is much easier to detect errors in the FlexiLayout at this stage than in a complete FlexiLayout, particularly if your documents have sophisticated layouts.

For more information, see [Debug the FlexiLayout](/flexi-capture/fls/settings/general-settings).

## Export the FlexiLayout

Once the FlexiLayout is complete, export it from ABBYY FlexiLayout Studio and import it into a data capture application.

For more information, see [Export FlexiLayouts](/flexi-capture/fls/dif/export).
