Community

How to recognize all line items (rows) in a table

I'd like to recognize a table that resides on one page of an invoice - please take a look at the example in the file I have included.  Some issues with this table preventing it from being recognized using a table search element/block include: one column is missing a header, there is a lot of empty space between the rows, and two rows are missing data in one column.  Research so far makes me think I need to use a repeating group element/block but I'm not sure exactly how to do that and I struggle to find instructions that address the previously mentioned issues that I see with this table...  Thank you.

0

Comments

1 comment

  • Avatar
    Mike Daigle

    I avoid using the table element for this and several other reasons.  Much easier to create separate static text elements and character string elements to achieve similar, yet more reliable results.  You can even find your column headers and create column-like regions based on those static text header elements.  Works very well especially when you use script to give the program options of locating the column, even in the event that the static text header element is not found.

    With respect to rows, you can do something like this after you find a reliable "item_header" element with the use of the above strategy.

    */RSA:rgnSearchareas.Region;

    let DB = rgrItemHeaders;
    int n = rgrItemSearchAreas.InstancesCount;

    if (n + 1 <= DB.InstancesCount) then
    {
      Below: DB.Instance(n + 1).csItemHeaders.Rect.top-1mm;
      if (n + 2 <= DB.InstancesCount) then
      {
       Above: DB.Instance(n + 2).csItemHeaders.Rect.top-1mm;
      }
     
    }
    else
    {
     DontFind;
    }*/

    0

Please sign in to leave a comment.