Skip to main content
Now that all the preparations are complete, you can search for the Invoice Table field. A Table element detects it, using the strategy decided in Step 13:
  • Header – The Reference and Designation column names use keywords; the Quantity, Unit Price, and Total column names use the auxiliary elements you described.
  • Footer – The previously described keyword element detects it.
  • Search area – The Sales column name restricts the search area on the right.

Create the InvoiceTable element

1

Create the Table element

Create an element of type Table and name it InvoiceTable.
2

Select the table block

Click the Columns tab, click Select, and specify the previously described InvoiceTable block as the block this element detects. For more information, see Step 3.
3

Configure the Reference and Designation columns

Select the Reference column and click Properties…. The keyword Reference finds this column name, so leave the default values. Do the same for the Designation column.
4

Configure the Quantity column

Select the Quantity column and click Properties…. To find this column name, use the previously detected TableHeader.kwQuantity element: select Use found element as column name, click Browse button, and select the TableHeader.kwQuantity element.
Screenshot of the Properties of column Quantity dialog box in ABBYY FlexiLayout Studio, with Use found element as column name selected and set to SearchElements.TableHeader.kwQuantity.
5

Configure the UnitPrice column

Select the UnitPrice column and click Properties…. Use the previously detected TableHeader.kwUnitPrice element: select Use found element as column name, click Browse button, and select the TableHeader.kwUnitPrice element.
Screenshot of the Properties of column UnitPrice dialog box in ABBYY FlexiLayout Studio, with Use found element as column name selected and set to SearchElements.TableHeader.kwUnitPrice.
6

Configure the Total column

Select the Total column and click Properties…. Use the previously detected TableHeader.kwTotal element: select Use found element as column name, click Browse button, and select the TableHeader.kwTotal element.
7

Add a column-order rule

Click the Order tab. Other columns (for example, Unit) can appear between the sought columns, but the sought columns always appear in this order: Reference, Designation, Quantity, Unit Price, Total. Select Rules for column order, click Add…, and specify this order: Reference << Designation << Quantity << Unit Price << Total.
Screenshot of the Order tab of the Properties of SearchElements.InvoiceTable dialog box in ABBYY FlexiLayout Studio, with Rules for column order selected and a rule listing Reference, Designation, Quantity, Unit Price, and Total in order.
8

Order the columns in the rule

In the Edit Column Order Rule dialog box, move the columns into the Selected columns list in the order Reference, Designation, Quantity, UnitPrice, Total.
Screenshot of two Edit Column Order Rule dialog boxes in ABBYY FlexiLayout Studio, showing the available columns being moved into the Selected columns list in the order Reference, Designation, Quantity, UnitPrice, Total.
9

Configure the header

Click the Header tab. The header is needed, but it needs no search constraints, so leave the default values.
Screenshot of the Header tab of the Properties of SearchElements.InvoiceTable dialog box in ABBYY FlexiLayout Studio, showing Look for header and Header is optional selected with the default search options.
10

Configure the footer

Click the Footer tab. To detect the footer, use the previously detected Footer.kwFooter element: select Use found element as footer, click Browse button, and select the Footer.kwFooter element.
Screenshot of the Footer tab of the Properties of SearchElements.InvoiceTable dialog box in ABBYY FlexiLayout Studio, with Use found element as footer selected and set to SearchElements.Footer.kwFooter.
11

Set the master columns

Click the Rows tab. Some columns can have entries of several lines, so specify master columns to detect the rows. Select Use master columns to detect rows, click Browse button, and set the master columns in this priority order:
  • Total – The primary column, because it always contains data and one table row corresponds to each entry.
  • Quantity – The secondary column, used if FlexiLayout Studio does not detect Total.
  • Unit Price – The tertiary column, used if it detects neither Total nor Quantity.
Screenshot of the Rows tab of the Properties of SearchElements.InvoiceTable dialog box in ABBYY FlexiLayout Studio, with Use master columns to detect rows selected and Total, Quantity, and UnitPrice listed as the master columns.
12

Constrain the table position

Click the Relations tab. The sought columns are to the left of the Sales column name, with a small gap, so set this constraint:
  • Left of the TableHeader.kwSales element, Offset = -40, Reference boundary = Left
When selecting offset values, analyze the geometrical properties (size and boundaries) of the reference and sought objects detected during pre-recognition. Otherwise, select these values by trial and error.
13

Match and check the Quantity column

Match the FlexiLayout with the test images. FlexiLayout Studio detects the table element on every image where it occurs. On some images, the Quantity column also includes unwanted artifacts from the previous column. To separate the useful data from the noise, specify the type of content the column can contain.
14

Set the Quantity content type

Open the Properties dialog box of the InvoiceTable element and click the Columns tab. Open the Properties dialog box for the Quantity column, select Check content type, and select Number in the Type of column content drop-down list.
Screenshot of the Properties of column Quantity dialog box in ABBYY FlexiLayout Studio, with the Check content type option selected and Number chosen in the Type of column content drop-down list.
15

Verify the column

Match the FlexiLayout with the test images and confirm that the Quantity column contains no unwanted data.
16

Set the block source element

To describe the location of the InvoiceTable block, select Source element, click Browse button, and specify the InvoiceTable element as the source element.