English (English)

Sample 4. Step 6.5; The final part of the document, Paragraph element

To create a Paragraph element:

  1. In the InvoiceFooter element, create a required element of type Paragraph and name it Paragraph.
  2. Click the Advanced tab and in the Advanced pre-search relations field, specify additional search conditions:
    Do not search for the element if neither, LongFooter nor ShortFooter has been detected. If LongFooter has been detected, specify the search area as the rectangular region of this element expanded by 10 dots vertically and horizontally. If ShortFooter has been detected, specify the search area as the rectangular region of this element expanded by 10 dots vertically and horizontally. In the FlexiLayout language, this condition can be written as follows:

If LongFooter.IsNull and ShortFooter.IsNull then Dontfind();
// Do not search for the element if none of the elements are detected
else
{ if not LongFooter.IsNull then
// If LongFooter is detected, the search area is defined based on its region
{ LeftOf: LongFooter.Rect.Right + 10dt;
RightOf: LongFooter.Rect.Left - 10dt;
Below: LongFooter.Rect.Top - 10dt;
Above: LongFooter.Rect.Bottom + 10dt;
}
else if not ShortFooter.IsNull then
// If ShortFooter is detected, the search area is defined as the region of ShortFooter
{ LeftOf: ShortFooter.Rect.Right + 10dt;
RightOf: ShortFooter.Rect.Left - 10dt;
Below: ShortFooter.Rect.Top - 10dt;
Above: ShortFooter.Rect.Bottom + 10dt;
}
}

Try matching the FlexiLayout and make sure that the pages are correctly separated into documents as defined by the Header and Footer elements. Once the FlexiLayout is matched with all the pages, the documents should be assembled as specified in the reference assembly created when we started work on this FlexiLayout.

Note.To apply the FlexiLayout to all test images, use keyboard shortcuts:

  • Activate the Batch window
  • Press Ctrl+A to select all the pages.
  • Press Ctrl+E to analyze all the selected pages.

Note.In the case of a multi-page document, be sure to apply the FlexiLayout to all the pages of the document, not just to some of the pages. Otherwise, the program may fail to apply the FlexiLayout to some of the documents.

25.05.2023 7:55:03

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.