Skip to main content
Analysis of the test images reveals that the name of the field Invoice Date is a short and very common word “Date.” This means that you must restrict the search area as much as possible. You will have noticed that the name of the Date field (whenever it occurs on an image) is located very close to the name of the field Invoice Number. To create the kwInvoiceDate element:
  1. In the InvoiceHeader element, create an element of type Static Text and name it kwInvoiceDate.
  2. Click the Static Text tab.
  3. In the Search text field, enter the text to find: “Date”.
  4. Leave 30 as the value for the Max error percentage (for the 4-letter search word, this means no more than 1 error).
  5. Click the Relations tab.
  6. On the Relations tab, specify that the keywords of the name can only occur below the name of the field Invoice Number, but no more than 150 dots below its bottom boundary.
    • Below the element kwInvoiceNumber, Offset = 0, and
    • Above the bottom of the element kwInvoiceNumber, Offset = -150, Reference boundary = Bottom.
Screenshot of the Relations tab of the Properties of SearchElements.InvoiceHeader.kwInvoiceDate dialog box in ABBYY FlexiLayout Studio, showing the Below and Above relations to the kwInvoiceNumber element.
To select the best values for offsets, you may want to analyze the geometrical properties (that is, size and boundaries) of the objects detected during pre-recognition.
  1. Click the Advanced tab.
  2. Since the Invoice Date field is in the left half of the image, set the following additional search constraint in the Advanced pre-search relations field: Look for the object in the left half of the image. In the FlexiLayout language:
    LeftOf: PageRect.Left + PageRect.Width/2;
  3. Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.