Gets information about the zone at the specified index in the zone list of the specified page.
Syntax
Parameters
- pageIndex
- Specifies the index of the page for which to get the zone information. This is a zero-based index.
- zoneIndex
- Specifies the index of the zone for which to get the information. This is a zero-based index.
Return Value
RasterDocumentZoneData class which contains zone information for the specified zone in the specified page.
Example
Visual Basic | Copy Code |
---|
Public Sub GetZoneExample()
RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")
Dim rasterDocument As RasterDocumentEngine
rasterDocument = RasterDocumentEngine.Instance
rasterDocument.Startup()
Try
Dim _zoneData As RasterDocumentZoneData = rasterDocument.GetZone(0, 0)
MessageBox.Show("The engine retrieved the specified zone information successfully")
_zoneData.FillMethod = RasterDocumentFillMethod.OcrA
_zoneData.Type = RasterDocumentZoneType.Graphic
rasterDocument.UpdateZone(0, 0, _zoneData)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
rasterDocument.Shutdown()
End Sub |
C# | Copy Code |
---|
public void GetZoneExample() { // Note that this is a sample key, which will not work in your toolkit RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey"); RasterDocumentEngine rasterDocument; rasterDocument = RasterDocumentEngine.Instance; rasterDocument.Startup(); // assume page is added, refer to AddPage example for more information // assume zones are added, refer to AddZone example or FindZones for more information // assume page is recognized, refer to Recognize example for more information try { RasterDocumentZoneData _zoneData = rasterDocument.GetZone(0, 0); MessageBox.Show("The engine retrieved the specified zone information successfully"); _zoneData.FillMethod = RasterDocumentFillMethod.OcrA; _zoneData.Type = RasterDocumentZoneType.Graphic; rasterDocument.UpdateZone(0, 0, _zoneData); } catch (Exception ex) { MessageBox.Show (ex.Message); } rasterDocument.Shutdown(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also