Skip to main content
At this step, decide the following:
  • Is there any pattern in the arrangement of the fields on the images?
  • Which elements can be used as reference elements for field detection?
  • Which element search order is the best choice? (At each new step, you can only refer to previously described elements.)
Analyze the available images.
  1. You will have noticed that the central part of the document contains a table which occurs on all the images.
    In FlexiLayout Studio, a table is an image object made up of fragments that consist of rows and columns visually separated by separator lines or by white gaps. For more information, see Work with tables.
  2. Above the table there is a group of fields (which may be named the InvoiceHeader): Invoice Number, Invoice Date, and Delivery Address. Note that the field Invoice Number occurs on all the images and can be used as an identifier field, while the fields Invoice Date and Delivery Address are optional.
  3. Below the table there is a group of fields (which may be named the Footer): TotalQuantity, TotalAmount and Country. These fields also do not occur on all the images.
Start by describing the search for elements in the upper part of the document. To detect the upper fields, create a logical group that unites all the elements used to look for the fields Invoice Number, Invoice Date, and Delivery Address.
  1. Create an element of type Group and name it InvoiceHeader.
    The fields Invoice Number, Invoice Date, and Delivery Address are always located in the upper left corner. Moreover, their order is always the same: Delivery Address followed by Invoice Number followed by Invoice Date (provided they occur on the image). Look for them in the same order.
  2. To describe the search for the keywords of the field names Invoice Number, Invoice Date, and Delivery Address, use elements of type Static Text. The InvoiceHeader element must contain the following elements:
    • kwDeliveryAddress element of type Static Text, which will correspond to the name of the field Delivery Address. For detailed instructions, see Step 5.
    • kwInvoiceNumber element of type Static Text, which will correspond to the name of the field Invoice Number. For detailed instructions, see Step 6.
    • kwDate element of type Static Text, which will correspond to the name of the field Invoice Date. For detailed instructions, see Step 7.
  3. Search for the fields Invoice Number and Invoice Date in the same row as their corresponding names, to the right of the names.
    In the InvoiceHeader element, create the following elements:
    • InvoiceNumber element of type Character String, which will correspond to the field Invoice Number. For detailed instructions, see Step 8.
    • A Group element grDate to look for the field Invoice Date. For detailed instructions, see Step 9.
In the InvoiceHeader.grDate element, create:
  • InvoiceDate element of the Date type, which will correspond to the Invoice Date field in the case of good quality images. For detailed instructions, see Step 9.
  • InvoiceDateAsString element of type Character String, which will correspond to the Invoice Date field if the program fails to find the InvoiceDate element. For detailed instructions, see Step 9.
    For more information on finding dates on poor quality images, see the Tips and Tricks section.
  1. The field Delivery Address has multiple lines, so an element of the Paragraph type is needed to detect it. However, before creating this element, limit the search area as much as possible. For the right boundary of the search area, use an element of the White Gap type. Then group all the elements that describe the location of the field Delivery Address into a Group element:
    • In the element InvoiceHeader, create a Group element and name it grAddress. For detailed instructions, see Step 10.
In the grAddress element, create the following elements:
  • An auxiliary element wgAddressRight of the White Gap type, which borders the field Delivery Address on the right. For detailed instructions, see Step 11.
  • An element DeliveryAddress of the Paragraph type, which will correspond to the field Delivery Address. For detailed instructions, see Step 12.