Skip to main content
Judging by the test images, the ingredients list is a text fragment that is always located below the Ingredients field name but above the separator over the Cooking field name. To make these elements easier to describe and to limit the number of possible hypotheses, group them into a Group element.
1

Create the RecipeContents Group element

Create a Group element and name it RecipeContents.
2

Add the IngredientsHeader element

Within the RecipeContents element, create a Static Text element and name it IngredientsHeader. It corresponds to the name Ingredients. Specify the element’s properties as in Step 10 for the Recipe element.
3

Add the Separator element

Within the RecipeContents element, create a Separator element for the separator above the name Cooking.
  1. On the Separator tab, set the separator orientation to Horizontal.
  2. In the element’s Properties dialog box, click the Relations tab and set the search constraint below the name Ingredients: (that is, Below the IngredientsHeader element).
If you match the FlexiLayout, FlexiLayout Studio sometimes treats the lower boundary of an image as a separator. To solve this, add another search constraint.In the Advanced pre-search relations field (Properties dialog box, Advanced tab), add this constraint: look for the separator closest to the name Ingredients:. In the FlexiLayout language, write it as follows:
You can also specify this constraint via the graphical user interface. Click the Relations tab, select Nearest, in the To drop-down list select Element, and then specify IngredientsHeader as the Reference element.
4

Match the adjusted FlexiLayout

Match the adjusted FlexiLayout again.
Screenshot of the ABBYY FlexiLayout Studio editor showing a matched recipe document with the IngredientsHeader element drawn around the Ingredients heading and the Separator hypothesis shown in the Tree of Hypotheses.
5

Constrain IngredientsHeader to the upper part of the page

Add another search constraint for the IngredientsHeader element. In the Advanced pre-search relations field (Properties dialog box, Advanced tab), add this constraint: look for the field name in the upper part of the image. In the FlexiLayout language, write it as follows:
6

Add the Ingredients Paragraph element

Within the RecipeContents element, create a Paragraph element and name it Ingredients. It corresponds to the Ingredients field.On the Relations tab of the element’s Properties dialog box, set the search constraints: below the Ingredients: heading (Below the IngredientsHeader) but above the separator (Above the Separator element).Match the FlexiLayout against the test images and confirm that FlexiLayout Studio finds the Ingredients field on every image.

Create the Ingredients block

Create the Ingredients block the same way as the RecipeNumber block. The only difference is that you must specify the Ingredients element as the source element for the Ingredients block.