LEADTOOLS OCR (Leadtools.Forms.Ocr assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
AutoDetectCells Method
See Also 
Leadtools.Forms.Ocr Namespace > IOcrTableZoneManager Interface : AutoDetectCells Method



zoneIndex
The 0-based index of the zone inside this page IOcrPage.Zones. This zone must exist in the list and its type must be a table (OcrZone.ZoneType must be OcrZoneType.Table) otherwise, this method will throw an exception.
zoneIndex
The 0-based index of the zone inside this page IOcrPage.Zones. This zone must exist in the list and its type must be a table (OcrZone.ZoneType must be OcrZoneType.Table) otherwise, this method will throw an exception.
Detects the cells within a table zone.

Syntax

Visual Basic (Declaration) 
Sub AutoDetectCells( _
   ByVal zoneIndex As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As IOcrTableZoneManager
Dim zoneIndex As Integer
 
instance.AutoDetectCells(zoneIndex)
C# 
void AutoDetectCells( 
   int zoneIndex
)
C++/CLI 
void AutoDetectCells( 
   int zoneIndex
) 

Parameters

zoneIndex
The 0-based index of the zone inside this page IOcrPage.Zones. This zone must exist in the list and its type must be a table (OcrZone.ZoneType must be OcrZoneType.Table) otherwise, this method will throw an exception.

Example

For an example, refer to IOcrTableZoneManager.

Remarks

When this method returns, the OcrZone.Cells member of given Leadtools.Forms.Ocr.OcrZone will contain an array of the detected cells and their properties.

You can use table cells in one of two ways:

To manipulate a cell properties other than its bound (OcrZoneCell.Bounds), get the array of detected cells through OcrZone.Cells, change the cell background color, style or any border color, style or with. When you are done, re-set the array to OcrZone.Cells and call IOcrTableZoneManager.UpdateCells.

It is not recommended that you manually remove or add cells to the OcrZone.Cells, the engine is very sensitive to zone boundaries and any non-accurate information will cause an error. Instead, use the various methods of IOcrTableZoneManager to manipulate the cell location and size.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

AutoDetectCells requires an OCR module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features