FlexiLayout: Capturing a table using Repeating Group

In some cases, in FlexiLayout Studio, the table in the document can not be captured correctly using the Table element. Usually, such tables have complex layouts, do not have delimiters, etc. In such cases, the Repeating Groups can be used to capture such tables.

It is possible to capture any table using a Repeating Group element. But since the Repeating Groups take a lot of memory for matching, it doesn't mean that Repeating Group should be used in any possible case.

For example, Table element has the following benefits:

  • It can automatically capture the table that spreads across multiple pages.
  • It can automatically skip the header row of a table on the consequent pages.
  • If the footer rows of the table only have blank rows, they will be ignored and the program will automatically go straight to the next rows that are not empty.
  • And more.

However, sometimes the table cannot be captured well using the Table element. For instance, in the following cases:

  • When there are some empty rows, but the table itself does not end there and the subsequent rows are not empty.

  • When the characters in the rows are too close to the ruled lines on the top, bottom, left, and right, or the distance between the rows is too small, so the rows cannot be captured properly.

  • When the table has a complex layout.
  • And more.

In such cases, you may consider capturing the table using a Repeating Group. Using Repeating Group to capture the table that cannot be read by Table element greatly increases the chances of better results. And although the automatic functions that are unique to the Table element, such as described above, are lost, it can often be covered up.

Please refer to the following example on capturing the simple table using the Repeating Group step-by-step.


1. Specify the area of the repetition (the area where the "rows" are repeated) using the Separators.
In the case of this sample table, the area will be below the header of the table and inside the box of the table.
The image below displays what is inside the lines surrounding the table:

2. Specify the search area using the separators: 

The repeating part is below the header row:

3) Specify the repeating area below the table's header:

4. Set the relations of the anchor repeating element.

By the anchor repeating element, we mean the element which instances we will search for first. This element should be present in each row of the table and in the same position in each row. 
For example, the line at the bottom of the row, that can be found using the Separator element is:

  • Below the header row
  • Nearest to the page's top edge

If you specify this and Match, it will automatically generate the repetition of the anchor repeating element as it is shown on the image below:

By default, the element of repetition is found within the set repetition range so that it does not overlap with the previous element.

5. To make the project easier to navigate, we will put elements of a row inside the Group. Each row is above "hSp_Row_bottom1, 2, 3....N", so specify this in the Relations tab.

As mentioned above, the part that you need to capture is above each line at the bottom of the row "hSp_Row_bottom1, 2, 3....N". But usually the program wouldn't be able to tell below what elements it is.
The useful thing about Repeating groups is that we can specify what instance of the Repeating Group we will build relations to.

It looks almost the same as the previous settings, but note that it specifies that each line at the bottom of the row is below the "LastFound" of "hSp_Row_bottom1, 2, 3....N".

To better explain what "LastFound" is, we can take the repetition of each line at the bottom of the row "hSp_Row_bottom1, 2, 3....N" as the example.
If the bottom of the "hSp_Row_bottom1, 2, 3....N" is set to "CurrentInstance" (default), then "LastFound" is the one that is before last repeated instance, meaning that the actual structure of the "hSp_Row_bottom1, 2, 3....N" would be "hSp_Row_bottom0(null), 1, 2....N-1"


LastFound with CurrentInstance hSp_Row_bottom 2 is hSp_Row_bottom1
LastFound with CurrentInstance hSp_Row_bottom 3 is hSp_Row_bottom2

The example of getting each row and its elements in FlexiLayout:

The example of the recognition results in FlexiCapture:

For any additional details, you can check the attached project.

* The example project requires FlexiCapture version or higher to view.

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.

Recently viewed