Activates the already specified languages into the OCR document engine.
Syntax
Parameters
- languages
- Array of language ids that will be activated.
Example
Visual Basic | Copy Code |
---|
Public Sub SelectLanguagesExample()
RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")
Dim rasterDocument As RasterDocumentEngine
rasterDocument = RasterDocumentEngine.Instance
rasterDocument.Startup()
Dim lang As RasterDocumentLanguage() = New RasterDocumentLanguage(0) {}
Try
lang(0) = RasterDocumentLanguage.English
rasterDocument.SelectLanguages(lang)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
rasterDocument.LanguageCharacterPlus = "Test Plus"
rasterDocument.LanguageCharacterPlusFilter = "Test Plus Filter"
If rasterDocument.LanguageCharacterFilter <> RasterDocumentCharacterFilter.All Then
rasterDocument.LanguageCharacterFilter = RasterDocumentCharacterFilter.All
End If
rasterDocument.Shutdown()
End Sub |
C# | Copy Code |
---|
public void SelectLanguagesExample() { // 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(); RasterDocumentLanguage[] lang = new RasterDocumentLanguage[1]; try { lang[0] = RasterDocumentLanguage.English; rasterDocument.SelectLanguages(lang); } catch (Exception ex) { MessageBox.Show(ex.Message); } rasterDocument.LanguageCharacterPlus = "Test Plus"; rasterDocument.LanguageCharacterPlusFilter = "Test Plus Filter"; if (rasterDocument.LanguageCharacterFilter != RasterDocumentCharacterFilter.All) rasterDocument.LanguageCharacterFilter = RasterDocumentCharacterFilter.All; 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