English (English) - Change language

Sample 4. Step 5.2: Name of Delivery Address field, kwDeliveryAddress element

Once you have examined the images, you will notice that:

  • The field in question is always located on the first page, in the first part of the page. Therefore, you can limit the search area to the first page and use absolute coordinates to specify a rectangular area.
  • We will use the AddressHeaders.txt file to search for the text.
    Note.Both the GUI and the FlexiLayout language allow you to use databases and text files to specify text lines to be found on an image. Text files can use either ANSI or Unicode encoding. Letter case does not affect the search and only serves to make the text more readable. Each search string must be placed on a separate line. Empty lines are ignored.
  • You can set the maximum error percentage to 20, which in our case means no more than 3 errors in each phrase.
    Note.The optimal number of errors can only be arrived at through trial and error. For details about the Static Text elements, see Static Text.

To create a kwDeliveryAddress element:

  1. In the InvoiceHeader element, create an element of type Static Text and name it kwDeliveryAddress.
  2. Click the Static Text tab.
  3. Select Search text from file and provide the path to the AddressHeaders.txt file (folder %public%\ABBYY\FlexiCapture\12.0\Samples\FLS\English\Invoice\Dict).
    A text file is accessed by its name, which can be either absolute or relative. Relative names are specified relative to the FlexiCapture project folder (the folder that contains the *.fcproj file) or the FlexiLayout Studio project folder (the folder that contains the images).

    Show me...

  1. Set Max error percentage to 20.
  2. Click the Search Constraints tab and use absolute coordinates to specify the rectangular search area on the first page:
    • Select Absolute search area constraints
    • In the Pages field, select Range from the drop-down list
    • In the Range field, type 1
    • In the Region field, specify the coordinates of the rectangle [1, 1, 2475, 1878]
    • Once you have specified the properties of the search area, click Add.... The search area will appear in the Search areas list
  3. Click the Advanced tab and in the Advanced pre-search relations specify
    WholeWordMode: true;// Only whole text objects will be treated as possible hypotheses
  4. Temporarily exclude the InvoiceFooter element and match the FlexiLayout.

9/15/2020 9:42:43 AM


Please leave your feedback about this article