RecAPI
Classes | Typedefs | Enumerations | Functions
Table Recognition Module
Zone Handling Module

Table detection and working with tables. More...

Classes

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

Typedefs

typedef CELL_INFO LPCELL_INFO
  Pointer to a structure CELL_INFO.
typedef const CELL_INFO LPCCELL_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.

The table detection algorithm can recognize tables both with (gridded table) and without visible grid lines (non-gridded table). While the algorithm can unconditionally detect gridded tables, detecting non-gridded tables is not supported when applying any of the following recognition languages: Arabic, Simplified Chinese, Traditional Chinese, Hebrew, Japanese, and Korean. The application can control whether non-gridded tables should also be detected by the function 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] hPage Handle of the page.
[in] xZone 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 kRecCreateTableInfo(IntPtr hPage, int xZone); 
The specification of this function in Java is:
 int kRecCreateTableInfo(HPAGE 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] hPage Handle of the page.
[in] iiImg Index of the image whose coordinate system is to be used to report the limits.
[in] xZone Index of the zone in the user zone list.
[in] CellIndex Index of the cell within the given zone.
[in] BorderIndex The index of the inquired border.
[out] xy Pointer 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] from Pointer 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] to Pointer 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] mmin Pointer 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] mmax Pointer 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); 
The specification of this function in Java is:
 int kRecDragCellBorder(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT xy, POINT from, POINT to, POINT mmin, 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] hPage Handle of the page.
[in] xZone Index of the zone in the user zone list.
[in] CellIndex Index of the cell within the given zone.
[out] pcolor Pointer 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); 
The specification of this function in Java is:
 int kRecGetCellColor(HPAGE hPage, int xZone, int CellIndex, long[] pcolor) 
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] hPage Handle of the page.
[in] xZone Index of the zone in the user zone list.
[out] pnCells Pointer 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); 
The specification of this function in Java is:
 int kRecGetCellCount(HPAGE hPage, int xZone, 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] hPage Handle of the page.
[in] iiImg Index of the image, in which the coordinates of the cell information are given.
[in] xZone Index of the zone in the user zone list.
[in] CellIndex Index of the cell within the given zone.
[out] pCellInfo Pointer 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); 
The specification of this function in Java is:
 int kRecGetCellInfo(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, 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] hPage Handle of the page.
[in] xZone Index of the user zone to be queried.
[in] xCell Index of the cell to be queried.
[out] ppCellName Address 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); 
The specification of this function in Java is:
 int kRecGetCellName(HPAGE hPage, int xZone, int xCell, 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] hPage Handle of the page.
[in] iiImg Index of the image whose coordinate system is used to report the splitters.
[in] xZone Index of the zone in the user zone list.
[out] pSplitters Pointer of a variable to store the address of an array with the y positions of the splitters.
[out] nSplitter Pointer 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); 
The specification of this function in Java is:
 int kRecGetHSplitters(HPAGE hPage, IMAGEINDEX iiImg, int xZone, IntOutputArray pSplitters) 
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] hPage Handle of the page.
[in] xZone Index of the zone in the OCR zone list.
[out] pnCells Pointer 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); 
The specification of this function in Java is:
 int kRecGetOCRCellCount(HPAGE hPage, int xZone, 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] hPage Handle of the page.
[in] iiImg Index of the image, in which the coordinates of the cell information are given.
[in] xZone Index of the zone in the OCR zone list.
[in] CellIndex Index of the cell within the given zone.
[out] pCellInfo Pointer 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); 
The specification of this function in Java is:
 int kRecGetOCRCellInfo(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, 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] hPage Handle of the page.
[in] xZone Index of the OCR zone to be queried.
[in] xCell Index of the cell to be queried.
[out] ppCellName Address 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); 
The specification of this function in Java is:
 int kRecGetOCRCellName(HPAGE hPage, int xZone, int xCell, 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] hPage Handle of the page.
[in] xZone Index of the OCR zone to be queried.
[out] pnRows Pointer to a variable for storing the number of rows.
[out] pnColumns Pointer 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); 
The specification of this function in Java is:
 int kRecGetOCRTableDimensions(HPAGE hPage, int xZone, int[] pnRows, 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] hPage Handle of the page.
[in] iiImg Index of the image, in which the coordinates of the point are given.
[in] xZone Index of the zone in the user zone list.
[in] Point The point inquired.
[in] xDist If 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] yDist If 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] pCellIndex Pointer of a variable to store the index of the cell, in which the given point is localized.
[out] pBorderIndex Pointer 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); 
The specification of this function in Java is:
 int kRecGetPointInfoFromTable(HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, int xDist, int yDist, int[] pCellIndex, 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] hPage Handle of the page.
[in] xZone Index of the OCR zone to be queried.
[out] pnRows Pointer to a variable for storing the number of rows.
[out] pnColumns Pointer 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); 
The specification of this function in Java is:
 int kRecGetTableDimensions(HPAGE hPage, int xZone, int[] pnRows, 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] hPage Handle of the page.
[in] iiImg Index of the image, in which the coordinates of the points are given.
[in] xZone Index of the zone in the user zone list.
[in] Point The point inquired.
[out] pTab Pointer 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); 
The specification of this function in Java is:
 int kRecGetTabPositionInTable(HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, 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] hPage Handle of the page.
[in] iiImg Index of the image whose coordinate system is used to report the splitters.
[in] xZone Index of the zone in the user zone list.
[out] pSplitters Pointer of a variable to store the address of an array with the x positions of the splitters.
[out] nSplitter Pointer 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); 
The specification of this function in Java is:
 int kRecGetVSplitters(HPAGE hPage, IMAGEINDEX iiImg, int xZone, IntOutputArray pSplitters) 
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] sid Settings Collection ID.
[in] hPage Handle of the page.
[in] zone The index of the zone in the user zone list.
[in] bForce Force 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); 
.
The specification of this function in Java is:
 int kRecLocateTable(int sid, HPAGE hPage, int zone, int 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] sid Settings Collection ID.
[in] hPage Handle of the page.
[in] zone The 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); 
.
The specification of this function in Java is:
 int kRecLocateTableColumns(int sid, HPAGE 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] hPage Handle of the page.
[in] iiImg Index of the image, in which the coordinates of the selecting rectangle are to be given.
[in] xZone Index of the zone in the user zone list.
[in] pRect The 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); 
The specification of this function in Java is:
 int kRecMergeCells(HPAGE 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] hPage Handle of the page.
[in] iiImg Index of the image, in which the coordinates of the point are given.
[in] xZone Index of the zone in the user zone list.
[in] CellIndex Index of the cell within the given zone.
[in] BorderIndex The index of the border to be moved.
[in] NewPosition The 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); 
The specification of this function in Java is:
 int kRecMoveCellBorder(HPAGE 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] hPage Handle of the page.
[in] xZone Index of the zone in the user zone list.
[in] CellIndex Index of the cell within the given zone.
[in] color The 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); 
The specification of this function in Java is:
 int kRecSetCellColor(HPAGE hPage, int xZone, int CellIndex, long 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] hPage Handle of the page.
[in] xZone Index of the user zone to be updated.
[in] xCell Index of the cell to be updated.
[in] pCellName Pointer 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); 
The specification of this function in Java is:
 int kRecSetCellName(HPAGE 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] hPage Handle of the page.
[in] iiImg Index of the image whose coordinate system you have used in defining the cell borders.
[in] xZone Index of the zone in the user zone list.
[in] pCells Pointer to the array of cells to be set in the table.
[in] nCells The 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); 
The specification of this function in Java is:
 int kRecSetCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, CELL_INFO pCells, int nCells) 
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] hPage Handle of the page.
[in] xZone Index of the OCR zone to be updated.
[in] xCell Index of the cell to be updated.
[in] pCellName Pointer 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); 
The specification of this function in Java is:
 int kRecSetOCRCellName(HPAGE 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] hPage Handle of the page.
[in] iiImg Index of the image, in which the position coordinates and the selecting rectangle must be given.
[in] xZone Index of the zone in the user zone list.
[in] bVertical This determines whether the splitter is vertical or not.
[in] pRect The cells intersected or contained by this rectangle are selected for this function.
[in] Position The position of the splitter.
[in] LineWidth The width of the splitter.
[in] LineStyle The style of the splitter.
[in] lineColor The 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); 
The specification of this function in Java is:
 int kRecSplitCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int bVertical, RECT pRect, POINT Position, int LineWidth, int LineStyle, long lineColor)