Visual Basic (Declaration) | |
---|---|
Function GetSupportedCellTypes() As OcrZoneType() |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As IOcrTableZoneManager Dim value() As OcrZoneType value = instance.GetSupportedCellTypes() |
C# | |
---|---|
OcrZoneType[] GetSupportedCellTypes() |
C++/CLI | |
---|---|
array<OcrZoneType>^ GetSupportedCellTypes(); |
Return Value
An array of OcrZoneType enumeration members that specifiy the cell types supported by this OCR engine.Currently, on the LEADTOOLS Professional OCR engine support manipulating the cells of a table zone. When using this engine, this method will return an array containing the following:
These are the only cell types that may be returned from the engine when table cells are auto-detected or you can manually set into OcrZoneCell.CellType. Setting any other cell type will result in an exception being thrown.
In the future, this restriction might be removed when more cell types are supported, it is recommended that you use GetSupportedCellTypes to programatically get a list of the supported types and construct and user interface from the values returned from this method (for example, a combo box for cell type selection in your application).
You can use table cells in one of two ways:
-
Perform auto-zoning on the page using IOcrPage.AutoZone, if the page contains a detected table, the a zone of type OcrZoneType.Table is created for this table. If the engine successfully detects the cells of the table, then it will fill the OcrZone.Cells with the properties of the detected cells.
-
Manually add a new Leadtools.Forms.Ocr.OcrZone with its type set to OcrZoneType.Table to the zones collection of a page. Leave the value of OcrZone.Cells to null (Nothing in Visual Basic), now use the IOcrTableZoneManager.AutoDetectCells method to instruct the engine to detect any cells in this zone and fill the array with the data.
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.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7