Visual Basic (Declaration) | |
---|---|
Public Interface IOcrSettingManager |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As IOcrSettingManager |
C# | |
---|---|
public interface IOcrSettingManager |
C++/CLI | |
---|---|
public interface class IOcrSettingManager |
Access the instance of the IOcrSettingManager used by an IOcrEngine through the IOcrEngine.SettingManager property.
IOcrSettingManager allows you to do the following:
- Get and set the underlying engine-specific settings. IOcrEngine is a wrapper for different OCR engines. These engines contain additional specific features and functionalities that can be queried and updated using the IOcrSettingManager interface.
- Load and save the engine settings. Once you set up the OCR engine, re-use these settings by saving the engine state into memory or to an XML file on disk. You can later reload these settings and use them in the same or a different instance of IOcrEngine.
Use the different methods of the IOcrSettingManager interface to get and set the engine-specific settings. Each setting has a unique name (a string value). Get all of the settings available to the current OCR engine through the GetSettingNames method. The GetSettingDescriptor method returns a description of the setting (its type, friendly name and value range). You can then use the various get and set methods to query and change the values of specific settings. For example, if the setting type is OcrSettingValueType.Integer, you can use the GetIntegerValue to get the current value of the setting and the SetIntegerValue to change its value. Refer to the example below for a complete demo.
This interface also contains methods to load and save the engine state to a .NET stream or an XML file on disk. The following table lists all the states saved:
Part | Members |
---|---|
IOcrSettingManager (accessed through IOcrEngine.SettingManager | All the settings as obtained through IOcrSettingManager.GetSettingNames |
IOcrLanguageManager (accessed through IOcrEngine.LanguageManager | The value of IOcrLanguageManager.GetEnabledLanguages |
IOcrSpellCheckManager (accessed through IOcrEngine.SpellCheckManager | The values of IOcrSpellCheckManager.Enabled, IOcrSpellCheckManager.SpellLanguage and IOcrSpellCheckManager.UserDictionary. |
IOcrDocumentManager (accessed through IOcrEngine.DocumentManager | The values of IOcrDocumentManager.EngineFormat, IOcrDocumentManager.RejectionSymbol and IOcrDocumentManager.MissingSymbol. |
IOcrZoneManager (accessed through IOcrEngine.ZoneManager | The values of IOcrZoneManager.OmrOptions.FrameDetectionMethod, IOcrZoneManager.OmrOptions.Sensitivity and the state characters of IOcrZoneManager.OmrOptions.GetStateRecognitionCharacter. |
You must call the IOcrEngine.Startup method before you can use the IOcrEngine.SettingManager property.
Note: The IOcrEngine.LanguageManager and IOcrEngine.SpellCheckManager state is also saved when the engine settings are saved. For more information, refer to IOcrSettingManager.Save.
For a list of supported engine-specific settings and their meanings, refer to OCR engine-specific Settings.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7
Reference
IOcrSettingManager MembersLeadtools.Forms.Ocr Namespace
GetSettingNames Method
GetSettingDescriptor Method
GetSettingDescriptor Method
OcrSettingValueType Enumeration
IOcrEngine Interface
IOcrEngine.Startup
IOcrEngine.IsStarted
IOcrEngine.Shutdown
OcrEngineManager Class
OcrEngineType Enumeration
IOcrLanguageManager Interface
IOcrSpellCheckManager Interface
Programming with Leadtools .NET OCR
Files to be Included with Your Application
OCR engine-specific Settings