Enumerates the available output file formats for the OCR document engine.
Syntax
Example
Visual Basic | Copy Code |
---|
Public Sub AvailableOutputFileFormatsExample()
RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")
Dim rasterDocument As RasterDocumentEngine
rasterDocument = RasterDocumentEngine.Instance
rasterDocument.Startup()
rasterDocument.AvailableOutputFileFormats()
Dim formatType As RasterDocumentFormatType() = rasterDocument.AvailableOutputFileFormats()
Dim i As Integer
For i = 0 To formatType.Length - 1
Dim fileInfo As RasterDocumentFileFormatInfo = New RasterDocumentFileFormatInfo()
fileInfo = rasterDocument.GetTextFormatInfo(formatType(i))
Dim buffer As String = String.Format("Format Name = {0}{1}Format DLL Name = {2}{3}Format Ext = {4}{5}Format Type = {6}", fileInfo.FormatName, Chr(13), fileInfo.DllName, Chr(13), fileInfo.ExtensionName, Chr(13), fileInfo.Type)
MessageBox.Show(buffer)
Next
rasterDocument.Shutdown()
End Sub |
C# | Copy Code |
---|
public void AvailableOutputFileFormatsExample() { /// Note that this is a sample key, which will not work in your toolkit RasterSupport.Unlock(RasterSupportType.Ocr, "TestKey"); RasterDocumentEngine rasterDocument; rasterDocument = RasterDocumentEngine.Instance; rasterDocument.Startup(); RasterDocumentFormatType[] formatType = rasterDocument.AvailableOutputFileFormats(); for (int i = 0; i < formatType.Length; i++) { RasterDocumentFileFormatInfo fileInfo = new RasterDocumentFileFormatInfo(); fileInfo = rasterDocument.GetTextFormatInfo(formatType[i]); string buffer = string.Format("Format Name = {0}\nFormat DLL Name = {1}\nFormat Ext = {2}\nFormat Type = {3}", fileInfo.FormatName, fileInfo.DllName, fileInfo.ExtensionName, fileInfo.Type); MessageBox.Show(buffer); } 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