Leadtools.Forms.Ocr Namespace > OcrZone Structure : Cells Property |
public OcrZoneCell[] Cells {get; set;}
'Declaration Public Property Cells As OcrZoneCell()
'Usage Dim instance As OcrZone Dim value() As OcrZoneCell instance.Cells = value value = instance.Cells
public OcrZoneCell[] Cells {get; set;}
get_Cells();
set_Cells(value);
public: property array<OcrZoneCell^>^ Cells { array<OcrZoneCell^>^ get(); void set ( array<OcrZoneCell^>^ value); }
Note: In Windows Runtime, the OcrZone does not contain an array of cells. Instead you can access and update the zone cells using IOcrZoneCollection.GetZoneCells and IOcrZoneCollection.SetZoneCells.
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 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: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2