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



The recognized characters collection of a zone inside a page.

Syntax

Visual Basic (Declaration) 
Public Interface IOcrZoneCharacters 
   Inherits ICollection(Of OcrCharacter)IEnumerable(Of OcrCharacter)IList(Of OcrCharacter)IEnumerable 
Visual Basic (Usage)Copy Code
Dim instance As IOcrZoneCharacters
C# 
public interface IOcrZoneCharacters : ICollection<OcrCharacter>IEnumerable<OcrCharacter>IList<OcrCharacter>IEnumerable  
C++/CLI 
public interface class IOcrZoneCharacters : public ICollection<OcrCharacter>IEnumerable<OcrCharacter>IList<OcrCharacter>IEnumerable  

Example

For an example, refer to IOcrPage.GetRecognizedCharacters.

Remarks

To get the recognized characters of a page, call IOcrPage.GetRecognizedCharacters after IOcrPage.Recognize or IOcrPage.RecognizeText.

To update the recognized characters of a page, call IOcrPage.GetRecognizedCharacters before calling IOcrDocument.Save or IOcrDocument.SaveXml.

IOcrPageCharacters implements the standard IList, ICollection and IEnumerable interfaces with items of type IOcrZoneCharacters. Each item in the IOcrPageCharacters contains a collection of the character collections of the zones.

The IOcrZoneCharacters interface contains a collection of the characters of a particular zones.

IOcrZoneCharacters also implements IList, ICollection and IEnumerable interfaces but with items of type OcrCharacter. Each item in the IOcrZoneCharacters contains a collection of the characters of the zone.

For example, if you are interested in iterating through the characters of the 2nd zone in the page, you can do the following:

            // Get the page characters
            IOcrPageCharacters pageCharacters = ocrPage.GetRecognizedCharacters();
            // Get the 2nd zone characters. Note, the index is zero-based so the 2nd zone is at index 1
            // You can also iterate through the pageCharacters collection and fine the IOcrZoneCharacters item with ZoneIndex = 1
            IOcrZoneCharacters zoneCharacters = pageCharacters.FindZoneCharacters(1);
            // Loop through the characters
            foreach(OcrCharacter ocrCharacter in zoneCharacters)
            {
               // Do something with ocrCharacter
            }
            

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

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