Creating a Document Definition based on a FlexiLayout

For documents like bills, payment orders, or invoices, you cannot use an ordinary Document Definition with fixed field locations. This is because the location, size, and number of fields may vary from document to document and, consequently, a fixed Document Definition cannot be uniformly applied to all of them. For this kind of documents, a Document Definition must include a special logical description termed FlexiLayout, which helps the program to locate the necessary fields based on keywords and the position of the fields relative to one another.

FlexiLayouts can be created in ABBYY FlexiLayout Studio, which ships together with ABBYY FlexiCapture. For detailed instructions on creating FlexiLayouts, please refer to ABBYY FlexiLayout Studio Help.

After you create a FlexiLayout, you need to export it to an *.afl file and then attach it to your Document Definition in ABBYY FlexiCapture. A FlexiLayout can apply to the entire Document Definition or to one of its sections. A FlexiLayout may have multiple pages.

Note: Besides one main FlexiLayout, you can create any number of additional FlexiLayouts for a document. The program will first apply the main FlexiLayout and then, one by one, each of the additional FlexiLayouts. If the names and types of the fields are identical in the main and in the additional FlexiLayouts, their fields will be merged. If the names of the fields are identical but their types are different in the main and in the additional FlexiLayouts, the additional FlexiLayouts will fail to load and error message will be displayed.

Attaching a FlexiLayout

A FlexiLayout can be attached at the stage of creating a Document Definition. To do this, in the second step in the Document Definition Wizard, add the document image, select the Load FlexiLayout option, and enter the path to the *.afl file containing the FlexiLayout.

You can attach a FlexiLayout from the Document Definition editor, using the properties dialog box of the Document Definition section.

  1. Select a document section. (If the document consists of a single section, in the Document Structure window, click the Pages tab and select the name of the section.) Right-click and select Properties... from the shortcut menu.
  2. Click the FlexiLayout tab.
  3. Click Load...
  4. Select the required *.afl file containing the FlexiLayout.

After you attach a FlexiLayout, the layout of the fields will be displayed on the image. Now you have to configure field properties as you do for a fixed Document Definition. Specify recognition, verification, and export properties and set the required rules.

Updating a FlexiLayout

To update FlexiLayouts used in the Document Definition, click Tools → Update FlexiLayouts.... In the dialog box that opens, specify the paths to FlexiLayouts and click Update.

Note: When importing a FlexiLayout with text files that contain possible field values, the program uses the relative paths that were defined when creating the FlexiLayout. The relative paths are relative to the project file. To edit these files, save the project locally (click Project → Export Project...), edit the files, and update the project on the server (click Project → Update Project...).

25.05.2023 7:55:02

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.