Skip to main content
So far, the Invoice Number, Invoice Date, and Delivery Address fields have been described. Now decide in which order the other elements must be detected. Analysis of the arrangement of the fields on the test images reveals that to detect the Country field, you can use the name of this field and an element of type Character String. But to detect the Total Quantity and Total Amount fields, you will need to use not only the name, which is shared by the two fields, but also additional elements. The names of the corresponding columns of the table may be used for this purpose.

Plan the search for the Invoice Table field

You also need to prepare for the search for the Invoice Table field, which is detected by means of an element of type Table.
  1. Describe the Header of the table. There are two ways to detect column names.
    • The first one is to specify one or several keywords in the Column Properties dialog box (the Properties dialog box of the Table element → Columns tab). This method is quick but not very flexible.
    • The second way is to use a previously detected element as a reference element to find the location of the column name. This method allows you to take full advantage of the additional settings available for elements. Analysis of the pre-recognition results reveals that the recognition quality is good enough, so you can use the first method (the only snag is the very short name of the Quantity column — 20% of errors in the three-letter keyword “Qty” effectively means that no errors are allowed). Use the first method to detect the first two columns, Reference and Designation, and use the previously described elements to detect the names of the rest of the columns: Quantity, Unit Price, and Total (these elements must be created anyway to detect the TotalQuantity and TotalAmount fields).
  2. Describe the Footer of the table. It can also be described either by using keywords or by using an auxiliary element. Analysis of the keywords in the footer reveals that on some of the images the keywords also occur in the first row of the table, so you have to use an auxiliary element to restrict the search area.
  3. Describe the table search area. After the header and the footer have been described, describe the right boundary of the table (the left boundary does not need to be described, as there are no other data in this part of the image). Since the context cannot be used to separate the figures in the Total column from the figures in the Sales column, a different approach is needed. You can use the name of the last column, Sales, to restrict the table search area on the right.
Elements and the order in which they must be detected are selected by trial and error and can be changed during FlexiLayout adjustment.

Describe the auxiliary elements

Before describing the remaining fields, describe the auxiliary elements.
  1. Analysis of interdependencies among the elements reveals that the names of the Quantity, Unit Price, Total, and Sales columns must be detected first.
  2. The header of the table begins with a horizontal separator between the column names and the Invoice Number, Invoice Date, and Delivery Address fields. This separator will help restrict the search areas of the column names.
    • For this purpose, create an element of type Separator and name it hsTableHeaderTop. For detailed instructions, see Step 14.
      Look for the column names in their natural order.
    • Create an element of type Group and name it TableHeader. For detailed instructions, see Step 15. This element must include:
      • Element kwQuantity of type Static Text, which will correspond to the name of the Quantity column of the table InvoiceTable. For detailed instructions, see Step 16.
      • Element kwUnitPrice of type Static Text, which will correspond to the name of the Unit Price column of the table InvoiceTable. For detailed instructions, see Step 17.
      • Element kwTotal of type Static Text, which will correspond to the name of the Total column of the table InvoiceTable. For detailed instructions, see Step 18.
      • Element kwSales of type Static Text, which will correspond to the name of the Sales column of the table InvoiceTable. For detailed instructions, see Step 19.
  3. Continue by describing the lower part of the document. The fields of interest are the name of the Total Quantity and the Total Amount fields (which serves as the bottom boundary of the table) and any other captions that can help locate the bottom boundary of the table. Also describe the name element and the source element for the Country field in this logical group.
  4. Create a Group element and name it Footer. This element must include:
    • Element kwFooter of type Static Text, which will correspond to the footer of the Invoice Table. For detailed instructions, see Step 21.
    • Element kwTotal of type Static Text, which will correspond to the name of the Total Quantity and the Total Amount fields. For detailed instructions, see Step 22.
    • Element kwOrigin of type Static Text, which will correspond to the name of the Country field. For detailed instructions, see Step 23.
    • Element Country of type Character String, which will correspond to the Country field. For detailed instructions, see Step 24.

Describe the remaining fields

Now that all the preparations have been made and the order of creating additional elements has been described, you can start looking for the remaining fields. Relying on the previously detected column names and Footer, describe the remaining Total Quantity, Total Amount, and Invoice Table fields.
  1. For this purpose, create two elements of type Character String and name them TotalQuantity and TotalAmount. These elements will correspond to the Total Quantity and the Total Amount fields respectively. For detailed instructions, see Step 25.
  2. Create an element of type Table and name it InvoiceTable. This element describes the Invoice Table field. For detailed instructions, see Step 26.