Community

Table's Header and Rows not recognized properly

Hello Experts,

I am new to Abbyy's FlexiCapture and learning to automate multipage pdf files which contains more tables to be exported using FlexiLayoutStudio.


For initial testing, I am trying to capture only one table information called "Responsible Staff" or "Staff" which is found above the "Events" heading in the pdf document.
Here I am facing two different issues:

1. Table header is recognized well but multiple rows are considered as one row. (Image reference: pat01.jpg and pat02.jpg. actually it contains two rows) since they have no row separator.
2. Multiple rows are recognized as header (Image reference: pat03.jpg)

Note: Tables will not contain row separator and column separator.
Ver. : FlexiLayout Studio 11.0

Since I am restricted to share tiff and pdf documents, as per our company policy, I am not uploading project and images. I have any way, attached the images with confidential data masked.

I am evaluating FlexiCapture tool and I have to update our management. Based on the success of the above scenarios, they would plan purchasing the tool.

Waiting for a possible reply.
0

Comments

6 comments

  • Avatar
    Vladislav Suvorov
    Hello,

    Problem with detecting multiple rows as one can be solved in two different ways:
    1)There is a checkmark "One line of text corresponds to one row" in Table element->Properties->Rows if all line items are actually one-line.
    2)You can also choose "Use master columns to detect rows" option and add master columns in the same menu but assuming the spaces between lines are extremely small that probably won't help(saying this in case not all line items are one-line). If you are not familiar with that option please look up information in Help:Appendix > Dialog boxes > Element Properties dialog box > Table rows
    Header on the attached image contains additional lines most likely because FlexiLayout didn't recognize two rows below the actual header as table and I can clearly see some kind of separator there(pat3.jpg) so that might be the cause. Please consider using this: Void IgnoreHorizontalSeparators() Ignores horizontal separators when dividing the table into rows. in pre-search relations of your Table element.
    More info on using various methods can be found in Help: FlexiLayout language > Specifying element properties > Table.
    Lastly, please attach screenshots of your Table element properties if solutions above won't work.

    Regards,
    Vladislav
    1
  • Avatar
    kawrthik
    Hi Vladislav,

    By clicking the "One line of text corresponds to one row" checkbox fixed the 1st Issue. (pat01.jpg and pat02.jpg)
    Many thanks for that.

    The second issue (pat03.jpg) still persists even after including IgnoreHorizontalSeparators().
    I went through the help links and tried various methods but nothing seems working so far.

    Below are my efforts in pre-search relations of theTable element.

    //MinHeaderKeyElements(4);

    //Let r = Rect(242dt, 2024dt, 2214dt, 2162dt);
    //HeaderSearchArea(r);
    IgnoreHorizontalSeparators();
    MinRowVerticalGap(0.05dt);
    MinMasterColumnRowGap(0.05dt);
    SingleLineTable(true);


    So, I have attached the screenshots of Table elements and block properties.
    0
  • Avatar
    Vladislav Suvorov
    Hello,

    For correct search area of Header please try restricting it using this method:
    Void HeaderSearchArea( Rect ) Specifies the search rectangle for the header. If this function is used, the search area of the header will be calculated as the intersection of this rectangle and the one enclosing the search area of the whole table.
    You can combine found Static text elements(keywords) into one rectangle:
    Constructors Rect Rect( XCoordinate left, YCoordinate top, XCoordinate right, YCoordinate bottom ) Constructs a value of type Rect from coordinates on the image. The boundaries of the rectangle are passed as parameters: left – left boundary, top – top boundary, right – right boundary, bottom – bottom boundary.
    It is possible to use other elements' bounds as Rect bounds(assuming you are using Static text elements to detect Columns and header it's rather easy to implement mentioned rectangle).
    If that still doesn't solve the problem please attach this(please see my attached file) for at least one column.

    Hope that helps,
    Vladislav
    0
  • Avatar
    kawrthik

    Hi Vladislav,

    I tried the below code

    Let r = Rect(TH_Staffs.kwName.Left,TH_Staffs.kwName.Top,TH _Staffs.kwEnd.Right,TH_Staffs.kwEnd.Bottom);

    but getting below error when checking...

    Error: Error in position 93: Wrong parameters for function Rect.

    Am I missing something ?
    0
  • Avatar
    Vladislav Suvorov
    And hello again,

    1)ElementName.Left(or any other edge) returns an interval instead of a coordinate so please try using ElementName.Rect.Left so that you receive X\Y coordinate as a result of this.
    2)ElementName.Left.Start\End also returns a coordinate but it requires knowledge of what FuzzyRectangle of a given element is(can be found in Help, also a part of answer "why ElementName.Edge doesn't work").

    Regards,
    Vladislav
    0
  • Avatar
    kawrthik
    Hi Vladislav,

    Thanks. I was able to locate correct header using HeaderSearchArea() method. It works now.
    0

Please sign in to leave a comment.