Leadtools.Document Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
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()
Managed Extensions for 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 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

Leadtools.Documentrequires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features