RecAPI
Table Recognition Module

Table detection and working with tables. More...

Classes

struct  CELL_INFO
 Structure of a cell in a table. More...

Typedefs

typedef CELL_INFOLPCELL_INFO
 Pointer to a structure CELL_INFO.
typedef const CELL_INFOLPCCELL_INFO
 Const pointer to a structure CELL_INFO.

Enumerations

enum  BORDERINDEX {
  LEFT_BORDER = 1,
  TOP_BORDER = 2,
  RIGHT_BORDER = 3,
  BOTTOM_BORDER = 4
}
 Index of the border element of a table or a cell. More...
enum  RLSTYLE {
  LS_NO,
  LS_SOLID,
  LS_DOUBLE,
  LS_DASHED,
  LS_DOTTED,
  LS_OTHER
}
 Possible types of lines. More...

Functions

RECERR RECAPIKRN kRecLocateTableColumns (int sid, HPAGE hPage, int zone)
 Cell detection.
RECERR RECAPIKRN kRecLocateTable (int sid, HPAGE hPage, int zone, INTBOOL bForce)
RECERR RECAPIKRN kRecCreateTableInfo (HPAGE hPage, int xZone)
 Creating table information.
RECERR RECAPIKRN kRecGetCellCount (HPAGE hPage, int xZone, int *pnCells)
 Getting cell number.
RECERR RECAPIKRN kRecGetOCRCellCount (HPAGE hPage, int xZone, int *pnCells)
 Getting cell number.
RECERR RECAPIKRN kRecGetCellInfo (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, LPCELL_INFO pCellInfo)
 Getting cell information.
RECERR RECAPIKRN kRecGetOCRCellInfo (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, LPCELL_INFO pCellInfo)
 Getting cell information.
RECERR RECAPIKRN kRecSplitCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, INTBOOL bVertical, const RECT *pRect, POINT Position, int LineWidth, int LineStyle, REC_COLOR lineColor)
 Splitting the selected cells.
RECERR RECAPIKRN kRecMergeCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, const RECT *pRect)
 Merging selected cells.
RECERR RECAPIKRN kRecGetPointInfoFromTable (HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, int xDist, int yDist, int *pCellIndex, BORDERINDEX *pBorderIndex)
 Getting the index of the nearest border.
RECERR RECAPIKRN kRecMoveCellBorder (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT NewPosition)
 Moving a cell border.
RECERR RECAPIKRN kRecDragCellBorder (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT *xy, POINT *from, POINT *to, POINT *mmin, POINT *mmax)
 Getting the limits of a border.
RECERR RECAPIKRN kRecGetTabPositionInTable (HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, POINT *pTab)
 Getting the next tabulator.
RECERR RECAPIKRN kRecSetCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, LPCCELL_INFO pCells, int nCells)
 Setting cells.
RECERR RECAPIKRN kRecSetCellColor (HPAGE hPage, int xZone, int CellIndex, REC_COLOR color)
 Setting the color of a cell.
RECERR RECAPIKRN kRecGetCellColor (HPAGE hPage, int xZone, int CellIndex, REC_COLOR *pcolor)
 Getting the color of a cell.
RECERR RECAPIKRN kRecGetHSplitters (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int **pSplitters, int *nSplitter)
 Getting the horizontal splitters.
RECERR RECAPIKRN kRecGetVSplitters (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int **pSplitters, int *nSplitter)
 Getting the vertical splitters.
RECERR RECAPIKRN kRecSetCellName (HPAGE hPage, int xZone, int xCell, LPCTSTR pCellName)
 Changing the name of a table-cell.
RECERR RECAPIKRN kRecGetCellName (HPAGE hPage, int xZone, int xCell, LPTSTR *ppCellName)
 Querying the name of a table-cell.
RECERR RECAPIKRN kRecSetOCRCellName (HPAGE hPage, int xZone, int xCell, LPCTSTR pCellName)
 Changing the name of a table-cell.
RECERR RECAPIKRN kRecGetOCRCellName (HPAGE hPage, int xZone, int xCell, LPTSTR *ppCellName)
 Querying the name of a table-cell.
RECERR RECAPIKRN kRecGetTableDimensions (HPAGE hPage, int xZone, int *pnRows, int *pnColumns)
 Querying the dimensions of a table.
RECERR RECAPIKRN kRecGetOCRTableDimensions (HPAGE hPage, int xZone, int *pnRows, int *pnColumns)
 Querying the dimensions of a table.

Detailed Description

Table detection and working with tables.

This module detects tables on the page and connects the recognition result and the table information to each other.

A table is described by the list of its cells in reading order (from left to right and top to bottom) ordered by their top-left coordinates. A cell is always a rectangle, thus a table is a sequence of rectangles.

All cell operations must adhere to the following restrictions:

NOTE: In both the SDK and its documentation, coordinates refer to grid-coordinates - i.e. the top or left borders of pixels. Thus a rectangle does not contain the pixels according to its right and bottom coordinates.

Table information in a table zone (WT_TABLE) contains the above mentioned table description. (See CELL_INFO.) The structure of a table zone can be determined in three different ways:

The User-started method is less accurate than the Engine-controlled one, thus it may be useful only when automatic cell detection is required before recognition (mainly for displaying on the UI).

The Engine-controlled method leaves the existing cell sequence, if any. In contrast, the User-started method recreates the cell sequence of the user zone even if the zone contains previous table information.

It follows from the above that the Engine-controlled method can be disabled by calling kRecCreateTableInfo.

About detection of tables having invisible cell-separators (so-called non-gridded tables) see the description in kRecSetNongriddedTableDetect.


Enumeration Type Documentation

Index of the border element of a table or a cell.

Enumerator:
LEFT_BORDER 

Index of left border.

TOP_BORDER 

Index of top border.

RIGHT_BORDER 

Index of right border.

BOTTOM_BORDER 

Index of bottom border.

enum RLSTYLE

Possible types of lines.

Enumerator:
LS_NO 

There is no line. (E.g. a cell without visible borders, or a frame indicated by only a different background color.)

LS_SOLID 

Solid line.

LS_DOUBLE 

Double line.

LS_DASHED 

Dashed line.

LS_DOTTED 

Dotted line.

LS_OTHER 

Not used.


Function Documentation

RECERR RECAPIKRN kRecCreateTableInfo ( HPAGE  hPage,
int  xZone 
)

Creating table information.

The kRecCreateTableInfo function creates table information for a user zone. The resulting table info has only one cell with the size of the whole table. This is required, because the cell manipulating functions work for user zones having table information (kRecSplitCells, kRecMergeCells, kRecMoveCellBorder, kRecDragCellBorder, kRecSetCellColor).

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the zone in the user zone list.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The specification of this function in C# is:
 RECERR kRecCreateTableInfo(IntPtr hPage, int xZone); 
RECERR RECAPIKRN kRecDragCellBorder ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
int  CellIndex,
BORDERINDEX  BorderIndex,
POINT *  xy,
POINT *  from,
POINT *  to,
POINT *  mmin,
POINT *  mmax 
)

Getting the limits of a border.

The kRecDragCellBorder function gets the moving limits of the border.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image whose coordinate system is to be used to report the limits.
[in]xZoneIndex of the zone in the user zone list.
[in]CellIndexIndex of the cell within the given zone.
[in]BorderIndexThe index of the inquired border.
[out]xyPointer of a variable to store the old position of the border. For a horizontal border, this is the old vertical position and vice versa.
[out]fromPointer of a variable to store the start of the line. For a horizontal border this is the starting x-coordinate of the border and vice versa.
[out]toPointer of a variable to store the end of the line. For a horizontal border this is the ending x-coordinate of the border and vice versa.
[out]mminPointer of a variable to store the minimum limit. For a horizontal border this is the minimum y-coordinate the border can move to and vice versa.
[out]mmaxPointer of a variable to store the maximum limit. For a horizontal border this is the maximum y-coordinate the border can move to and vice versa.
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
 RECERR kRecDragCellBorder(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, out POINT xy, out POINT from, out POINT to, out POINT mmin, out POINT mmax); 
RECERR RECAPIKRN kRecGetCellColor ( HPAGE  hPage,
int  xZone,
int  CellIndex,
REC_COLOR pcolor 
)

Getting the color of a cell.

The kRecGetCellColor function gets the color of a cell.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the zone in the user zone list.
[in]CellIndexIndex of the cell within the given zone.
[out]pcolorPointer of a variable to store the color of the cell.
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
 RECERR kRecGetCellColor(IntPtr hPage, int xZone, int CellIndex, out uint color); 
RECERR RECAPIKRN kRecGetCellCount ( HPAGE  hPage,
int  xZone,
int *  pnCells 
)

Getting cell number.

The kRecGetCellCount function gets the number of cells in a user zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the zone in the user zone list.
[out]pnCellsPointer to a variable to get the number of cells.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
 RECERR kRecGetCellCount(IntPtr hPage, int xZone, out int pnCells); 
RECERR RECAPIKRN kRecGetCellInfo ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
int  CellIndex,
LPCELL_INFO  pCellInfo 
)

Getting cell information.

The kRecGetCellInfo function gets the parameters of a cell in a user zone.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image, in which the coordinates of the cell information are given.
[in]xZoneIndex of the zone in the user zone list.
[in]CellIndexIndex of the cell within the given zone.
[out]pCellInfoPointer to a variable to get the structure of cell information.
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
The specification of this function in C# is:
 RECERR kRecGetCellInfo(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, out CELL_INFO pCellInfo); 
RECERR RECAPIKRN kRecGetCellName ( HPAGE  hPage,
int  xZone,
int  xCell,
LPTSTR *  ppCellName 
)

Querying the name of a table-cell.

The kRecGetCellName queries the name of a cell of a table type user zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the user zone to be queried.
[in]xCellIndex of the cell to be queried.
[out]ppCellNameAddress of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string will be terminated with a null character.)
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The memory allocated for *ppCellName can be released using kRecFree.
The specification of this function in C# is:
 RECERR kRecGetCellName(IntPtr hPage, int xZone, int xCell, out string ppCellName); 
RECERR RECAPIKRN kRecGetHSplitters ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
int **  pSplitters,
int *  nSplitter 
)

Getting the horizontal splitters.

The kRecGetHSplitters function gets the number and position of horizontal splitters.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image whose coordinate system is used to report the splitters.
[in]xZoneIndex of the zone in the user zone list.
[out]pSplittersPointer of a variable to store the address of an array with the y positions of the splitters.
[out]nSplitterPointer of a variable to store the number of splitters in the retrieved array.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
Since this function creates a new memory object containing the recognized data, the application should call kRecFree to free this memory area after evaluating the result.
The specification of this function in C# is:
 RECERR kRecGetHSplitters(IntPtr hPage, IMAGEINDEX iiImg, int xZone, out int[] splitters); 
RECERR RECAPIKRN kRecGetOCRCellCount ( HPAGE  hPage,
int  xZone,
int *  pnCells 
)

Getting cell number.

The kRecGetOCRCellCount function gets the number of cells in a OCR zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the zone in the OCR zone list.
[out]pnCellsPointer to a variable to get the number of cells.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
 RECERR kRecGetOCRCellCount(IntPtr hPage, int xZone, out int pnCells); 
RECERR RECAPIKRN kRecGetOCRCellInfo ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
int  CellIndex,
LPCELL_INFO  pCellInfo 
)

Getting cell information.

The kRecGetOCRCellInfo function gets the parameters of a cell in an OCR zone.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image, in which the coordinates of the cell information are given.
[in]xZoneIndex of the zone in the OCR zone list.
[in]CellIndexIndex of the cell within the given zone.
[out]pCellInfoPointer to a variable to get the structure of cell information.
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
The specification of this function in C# is:
 RECERR kRecGetOCRCellInfo(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, out CELL_INFO pCellInfo); 
RECERR RECAPIKRN kRecGetOCRCellName ( HPAGE  hPage,
int  xZone,
int  xCell,
LPTSTR *  ppCellName 
)

Querying the name of a table-cell.

The kRecGetOCRCellName queries the name of a cell of a table type OCR zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the OCR zone to be queried.
[in]xCellIndex of the cell to be queried.
[out]ppCellNameAddress of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string will be terminated with a null character.)
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The memory allocated for *ppCellName can be released using kRecFree.
The specification of this function in C# is:
 RECERR kRecGetOCRCellName(IntPtr hPage, int xZone, int xCell, out string ppCellName); 
RECERR RECAPIKRN kRecGetOCRTableDimensions ( HPAGE  hPage,
int  xZone,
int *  pnRows,
int *  pnColumns 
)

Querying the dimensions of a table.

The kRecGetOCRTableDimensions queries the number of rows and columns of a table type OCR zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the OCR zone to be queried.
[out]pnRowsPointer to a variable for storing the number of rows.
[out]pnColumnsPointer to a variable for storing the number of columns.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
The dimensions are returned only if the table is regular, otherwise (0, 0) will be returned. Regular table is a table in which each horizontal splitter lasts from the left to the right of the table and each vertical splitter lasts from the top to the bottom of the table, so the table contains nRows * nColumns cells.
The specification of this function in C# is:
 RECERR kRecGetOCRTableDimensions(IntPtr hPage, int xZone, int xCell, out int pnRows, out int pnColumns); 
RECERR RECAPIKRN kRecGetPointInfoFromTable ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
POINT  Point,
int  xDist,
int  yDist,
int *  pCellIndex,
BORDERINDEX pBorderIndex 
)

Getting the index of the nearest border.

The kRecGetPointInfoFromTable function gets the cell index and the nearest border's index for a given point.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image, in which the coordinates of the point are given.
[in]xZoneIndex of the zone in the user zone list.
[in]PointThe point inquired.
[in]xDistIf the distance of the point from the left or right border is less then this, the output border index will be the index of the nearest one. See pBorderIndex.
[in]yDistIf the distance of the point from the top or bottom border is less then this, the output border index will be the index of the nearest one. See pBorderIndex.
[out]pCellIndexPointer of a variable to store the index of the cell, in which the given point is localized.
[out]pBorderIndexPointer of a variable to store the index of the nearest border to the given point. Its value is always zero when the distance is greater than xDist and yDist from the proper border.
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
 RECERR kRecGetPointInfoFromTable(IntPtr hPage, IMAGEINDEX iiImg, int xZone, POINT Point, int xDist, int yDist, out int pCellIndex, out BORDERINDEX pBorderIndex); 
RECERR RECAPIKRN kRecGetTableDimensions ( HPAGE  hPage,
int  xZone,
int *  pnRows,
int *  pnColumns 
)

Querying the dimensions of a table.

The kRecGetTableDimensions queries the number of rows and columns of a table type user zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the OCR zone to be queried.
[out]pnRowsPointer to a variable for storing the number of rows.
[out]pnColumnsPointer to a variable for storing the number of columns.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
The dimensions are returned only if the table is regular, otherwise (0, 0) will be returned. Regular table is a table in which each horizontal splitter lasts from the left to the right of the table and each vertical splitter lasts from the top to the bottom of the table, so the table contains nRows * nColumns cells.
The specification of this function in C# is:
 RECERR kRecGetTableDimensions(IntPtr hPage, int xZone, int xCell, out int pnRows, out int pnColumns); 
RECERR RECAPIKRN kRecGetTabPositionInTable ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
POINT  Point,
POINT *  pTab 
)

Getting the next tabulator.

The kRecGetTabPositionInTable function gets the first tabulator position after the given position. The tabulator has only a horizontal position.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image, in which the coordinates of the points are given.
[in]xZoneIndex of the zone in the user zone list.
[in]PointThe point inquired.
[out]pTabPointer of a variable to store the position of the tabulator following Point.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
 RECERR kRecGetTabPositionInTable(IntPtr hPage, IMAGEINDEX iiImg, int xZone, POINT Point, out POINT pTab); 
RECERR RECAPIKRN kRecGetVSplitters ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
int **  pSplitters,
int *  nSplitter 
)

Getting the vertical splitters.

The kRecGetVSplitters function gets the number and position of vertical splitters.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image whose coordinate system is used to report the splitters.
[in]xZoneIndex of the zone in the user zone list.
[out]pSplittersPointer of a variable to store the address of an array with the x positions of the splitters.
[out]nSplitterPointer of a variable to store the number of splitters in the retrieved array.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
Since this function creates a new memory object containing the recognized data, the application should call kRecFree to free this memory area after evaluating the result.
The specification of this function in C# is:
 RECERR kRecGetVSplitters(IntPtr hPage, IMAGEINDEX iiImg, int xZone, out int[] splitters); 
RECERR RECAPIKRN kRecLocateTable ( int  sid,
HPAGE  hPage,
int  zone,
INTBOOL  bForce 
)

This function detects the columns within a table type user zone (WT_TABLE) of the page.

Parameters:
[in]sidSettings Collection ID.
[in]hPageHandle of the page.
[in]zoneThe index of the zone in the user zone list.
[in]bForceForce the zone type to be table. If it is FALSE the zone type may be changed to WT_GRAPHIC.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The specification of this function in C# is:
 RECERR kRecLocateTable(int sid, IntPtr hPage, int zone, bool bForce); 
.
RECERR RECAPIKRN kRecLocateTableColumns ( int  sid,
HPAGE  hPage,
int  zone 
)

Cell detection.

This function detects the cells within a table type user zone (WT_TABLE) of the page.

Parameters:
[in]sidSettings Collection ID.
[in]hPageHandle of the page.
[in]zoneThe index of the zone in the user zone list.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The specification of this function in C# is:
 RECERR kRecLocateTableColumns(int sid, IntPtr hPage, int zone); 
.
RECERR RECAPIKRN kRecMergeCells ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
const RECT *  pRect 
)

Merging selected cells.

The kRecMergeCells function merges the selected cells if they make up a rectangle.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image, in which the coordinates of the selecting rectangle are to be given.
[in]xZoneIndex of the zone in the user zone list.
[in]pRectThe cells intersected or contained by this rectangle are selected for this function.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
 RECERR kRecMergeCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, RECT pRect); 
RECERR RECAPIKRN kRecMoveCellBorder ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
int  CellIndex,
BORDERINDEX  BorderIndex,
POINT  NewPosition 
)

Moving a cell border.

The kRecMoveCellBorder function moves a border.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image, in which the coordinates of the point are given.
[in]xZoneIndex of the zone in the user zone list.
[in]CellIndexIndex of the cell within the given zone.
[in]BorderIndexThe index of the border to be moved.
[in]NewPositionThe new position of the given border.
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
 RECERR kRecMoveCellBorder(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT NewPosition); 
RECERR RECAPIKRN kRecSetCellColor ( HPAGE  hPage,
int  xZone,
int  CellIndex,
REC_COLOR  color 
)

Setting the color of a cell.

The kRecSetCellColor function sets the color of a cell.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the zone in the user zone list.
[in]CellIndexIndex of the cell within the given zone.
[in]colorThe color to be set.
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
 RECERR kRecSetCellColor(IntPtr hPage, int xZone, int CellIndex, uint color); 
RECERR RECAPIKRN kRecSetCellName ( HPAGE  hPage,
int  xZone,
int  xCell,
LPCTSTR  pCellName 
)

Changing the name of a table-cell.

The kRecSetCellName changes the name of a cell of a table type user zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the user zone to be updated.
[in]xCellIndex of the cell to be updated.
[in]pCellNamePointer to a string containing the name characters to be set. (The string is terminated with a null character.)
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The specification of this function in C# is:
 RECERR kRecSetCellName(IntPtr hPage, int xZone, int xCell, string pCellName); 
RECERR RECAPIKRN kRecSetCells ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
LPCCELL_INFO  pCells,
int  nCells 
)

Setting cells.

The kRecSetCells function puts the given cell sequence into a WT_TABLE user zone. If the given zone does not have table information this function creates it. If the zone has any cell sequence the former one is replaced by the new one.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image whose coordinate system you have used in defining the cell borders.
[in]xZoneIndex of the zone in the user zone list.
[in]pCellsPointer to the array of cells to be set in the table.
[in]nCellsThe number of cells in the array.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The function may rearrange the inserted cells.
When calling this function, ensure that the attributes of the splitters between cells are consistent: i.e. the same splitter attributes are specified by the neighboring cells. This is not checked by CSDK.
The specification of this function in C# is:
 RECERR kRecSetCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, CELL_INFO[] pCells); 
RECERR RECAPIKRN kRecSetOCRCellName ( HPAGE  hPage,
int  xZone,
int  xCell,
LPCTSTR  pCellName 
)

Changing the name of a table-cell.

The kRecSetOCRCellName changes the name of a cell of a table type OCR zone.

Parameters:
[in]hPageHandle of the page.
[in]xZoneIndex of the OCR zone to be updated.
[in]xCellIndex of the cell to be updated.
[in]pCellNamePointer to a string containing the name characters to be set. (The string is terminated with a null character.)
Return values:
RECERR
Note:
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The specification of this function in C# is:
 RECERR kRecSetOCRCellName(IntPtr hPage, int xZone, int xCell, string pCellName); 
RECERR RECAPIKRN kRecSplitCells ( HPAGE  hPage,
IMAGEINDEX  iiImg,
int  xZone,
INTBOOL  bVertical,
const RECT *  pRect,
POINT  Position,
int  LineWidth,
int  LineStyle,
REC_COLOR  lineColor 
)

Splitting the selected cells.

The kRecSplitCells function splits the cells (if the cut is in a selected area, only the selected cells are affected). This function supposes that the given user zone already has table information.

Parameters:
[in]hPageHandle of the page.
[in]iiImgIndex of the image, in which the position coordinates and the selecting rectangle must be given.
[in]xZoneIndex of the zone in the user zone list.
[in]bVerticalThis determines whether the splitter is vertical or not.
[in]pRectThe cells intersected or contained by this rectangle are selected for this function.
[in]PositionThe position of the splitter.
[in]LineWidthThe width of the splitter.
[in]LineStyleThe style of the splitter.
[in]lineColorThe color of the line.
Return values:
RECERR
Note:
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
 RECERR kRecSplitCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, bool bVertical, RECT pRect, POINT Position, int LineWidth, RLSTYLE LineStyle, int lineColor);