Creating Document Definitions for multipage documents

ABBYY FlexiCapture allows you to create Document Definitions for multipage documents. A Document Definition can comprise any number of sections, which can contain one or several pages. When creating a Document Definition for multipage documents, you must specify the order of sections, their number, and the rules used to assemble pages into documents.

Using the wizard, you can create a simple Document Definition that contains no sections. You can then add pages and sections to this Document Definition.

Adding pages

When you add a page to a Document Definition, its image appears in the image pane in the Document Definition editor window, while any fields you create on the page will be listed in the common fields list. In this case the document has one section, even though it may contain several pages.

You should add pages to a single section if your document has blocks continuing or recurring on several pages, or if it has tables extending to the next page. The same method is used for loading a multipage FlexiLayout (see Creating a Document Definition for semi-structured document processing). All fields in a FlexiLayout must belong to one section of a Document Definition.

To add a page to a section, select Document Definition → Add Pages... in the Document Definition editor or select the Add Pages... item on the shortcut menu of the image. Then load the image of a new uncompleted page and select the object types that have to be marked up automatically.

To delete a page, right-click it and click Delete Page on the shortcut menu.

Note: The Delete Page command deletes the page and its fields from the document structure. The Delete Image command deletes only the page image and retains the fields in the document structure (the regions of the fields will be deleted, however).

Adding sections

You can also add sections to a Document Definition. In the simplest scenario, one section contains one page. This scenario requires that the sets of fields on different pages are independent of one another. By adding sections to a Document Definition, you get a clearer picture of the document structure: you can see which field belongs to which section and you can configure document assembly as you see fit.

Suppose your document contains three types of pages, and pages of type 1 and type 3 may occur only once, while pages of type 2 may occur from two to five times. In this case, you need to create three sections, one for each page type, and specify the order of sections in the document and the number of their possible occurrences.

In a more complex scenario, a Document Definition may have several sections, some of which may contain more than one page. For example, a Document Definition may have a number of fixed sections and a flexible multipage section. Or a Document Definition may define documents with a recurring two-sided sheet.

Suppose you need to create a Document Definition for a document that has a title page (page A) and a certain number of two-sided sheets (page sequence BCBC...). In this case, you need to create section A consisting of page A, and section BC containing two pages, B and C. The document structure is configured as follows: section A may occur once and is followed by section BC, which may occur from three to seven times.

To add a new section, select Document Definition → Add Document Section... in the Document Definition editor. The section creation wizard will open. Follow the instructions of the wizard to:

  • specify a name for your section
  • load the image of an uncompleted page (either scan one or load a page from a file) or load a FlexiLayout file
  • select the object types to be marked up automatically

The new section and the fields it contains will be displayed in the document structure window.

Additional settings

For a Document Definition that has several sections, you can enable verification of key fields as well as specifying the order and number of recurring sections. To enable verification of key fields, you need to identify the key fields in each document section first. Their values must be identical in different sections. To add a key field to multiple pages in the same section, create a multiple key field and position its instances on different pages. An example of a key field is the name of the person who completed the document, which must be written on each page, or a certain identification number.

When processing a batch, the program tries to assemble the pages into documents, checking the assembly rules in the process. The program will perform a check of key field values if the corresponding option is selected. If the key fields do not match on the pages of the same document, an error message will be displayed. This may happen if document pages are misplaced during scanning, in which case changing the order of the pages will be enough to ensure correct document assembly. See Assembling pages into documents.

You can also import a section from another Document Definition in the project. To import a section, click Document Definition → Import Document Section... on the main menu and then select the section in the Select Section Definition to Import dialog box.

Note: Shared scripting modules are not imported when importing sections. As a result, script rules written in a new section may work incorrectly or may not work at all.

Viewing and editing results

To view the resulting document structure, in the Document Structure pane located in the right-hand part of the Document Definition editor, click the Pages tab. You will see the document structure represented by page thumbnails. On this tab, you can change the number of times a section may occur in the document (enter a number or range in the box to the right of the section name), attach annex pages, change the order of pages in the section, and move pages from one section to another by using drag-and-drop.

For pages that may occur multiple times within a section, select the Can repeat in section option in the Page Properties dialog box. To open the Page Properties dialog box, select Properties... on the shortcut menu of a page or press Alt+Enter.

Show document structure window

Document assembly

To specify the sequence and number of recurring sections and an assembly rule, select Document Definition → Document Definition Properties... in the Document Definition editor.

On the Assembly tab, specify the minimum and maximum number each section may occur in the document (the default value is 1).

If you want to check the values of key fields, select the Use key fields equality assembling rule option and then select a key field in each section.

Specify assembly rules. Both standard and custom assembly rules can be used.

Standard assembly rules allow you to disable checking the order of sections and to assemble documents with annex pages.

Disable checking the order of sections (Disable sections order check) if the order of sections has no effect on document assembly. The program will still check that all the sections are present in the document, but their order will be ignored. To assemble documents with annex pages, select the Enable annex pages option. If you want annex pages to be detected based on the document structure, select the corresponding option.

Show the Assembly tab

10.11.2020 12:08:04

Please leave your feedback about this article