Leadtools.Document Deprecated as of v16. Refer to: Leadtools.Forms.Ocr | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
AvailableOutputFileFormats Method
See Also  Example
Leadtools.Document Namespace > RasterDocumentEngine Class : AvailableOutputFileFormats Method



Enumerates the available output file formats for the OCR document engine.

Syntax

Visual Basic (Declaration) 
Public Function AvailableOutputFileFormats() As RasterDocumentFormatType()
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
Dim value() As RasterDocumentFormatType
 
value = instance.AvailableOutputFileFormats()
C# 
public RasterDocumentFormatType[] AvailableOutputFileFormats()
C++/CLI 
public:
array<RasterDocumentFormatType>^ AvailableOutputFileFormats(); 

Example

Visual BasicCopy Code
Public Sub AvailableOutputFileFormatsExample()
   ' Note that this is a sample key, which will not work in your toolkit
   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

Finds all available output text formats and reports them in array of RasterDocumentFormatType events.
To get the format information for each format, call GetTextFormatInfo. This method can be used to determine the available output file formats in the OCR document engine for saving the recognition results.
To recognize a page(s), call Recognize.
To save the recognition results to a file, call SaveResultsToFile.
For more information, refer to Recognizing Document Pages.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

The Leadtools.Document namespace is deprecated and no longer supported as of LEADTOOLS v16. For v16 and later, please refer to: Leadtools.Forms.Ocr. This documentation is retained for v15 and earlier informational use only.