TableBlock Object (ITableBlock Interface)

This object provides access to specific properties of a table block. The ITableBlock interface is derived from the IBlock interface and inherits all its properties.

The region of blocks of this type may consist of one rectangle only. The structure of the table is described by two collections of table separators, horizontal and vertical (the HSeparators and VSeparators properties), and a collection of table cells (the Cells property). Each table cell is treated as a block of some type. The number of rows (columns) in the table is equal to the number of horizontal (vertical) separators minus 1.

The recognized text is a property of a single cell, not of the entire table. To access the recognized text of a table block, you should do the following:

  1. Obtain the collection of table cells using the Cells property.
  2. Select the desired cell. Use the methods of the TableCells object.
  3. Obtain the block object of the cell (the ITableCell::Block property).
  4. Check that the block is of the type BT_Text (the IBlock::Type property) and receive the TextBlock object using the IBlock::GetAsTextBlock method.
  5. Use the ITextBlock::Text property.

Properties

Name Type Description
Cells TableCells, read-only Provides access to the cells collection of the table block. The collection always contains at least one cell, even if there are no table separators in the table. The cells in the collection are arranged in the logical reading order.
HSeparators TableSeparators, read-only Provides access to horizontal separators collection of the table block. This collection always contains at least two separators corresponding to the table block top and bottom.
VSeparators TableSeparators, read-only Provides access to vertical separators collection of the table block. This collection always contains at least two separators corresponding to the table block left and right borders.

Methods

Name Description
FindBaseCellFromPoint Allows you to find cell position in the base grid from the pixel on image. By the base grid here we assume the grid formed by table borders and separators. Each vertical separator increments the horizontal coordinate by one, and each horizontal separator increments the vertical coordinate by one. Coordinate axes are oriented from left to right and from top to bottom.
InitializeGrid Initializes table grid for the table block.

Related objects

Object Diagram

Output parameter

This object is the output parameter of the GetAsTableBlock method of the Block object.

See also

Block

Working with Layout and Blocks

Working with Text

Working with Properties

12.12.2022 20:26:03

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.