Leadtools.Document Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
SaveResultOptions Property
See Also  Example
Leadtools.Document Namespace > RasterDocumentEngine Class : SaveResultOptions Property




Values that specify the options that will be used when saving recognition results to a file.

Syntax

Visual Basic (Declaration) 
Public Property SaveResultOptions As RasterDocumentResultOptions
Visual Basic (Usage)Copy Code
Dim instance As RasterDocumentEngine
Dim value As RasterDocumentResultOptions
 
instance.SaveResultOptions = value
 
value = instance.SaveResultOptions
C# 
public RasterDocumentResultOptions SaveResultOptions {get; set;}
Managed Extensions for C++ 
public: __property RasterDocumentResultOptions get_SaveResultOptions();
public: __property void set_SaveResultOptions( 
   RasterDocumentResultOptions value
);
C++/CLI 
public:
property RasterDocumentResultOptions SaveResultOptions {
   RasterDocumentResultOptions get();
   void set (RasterDocumentResultOptions value);
}

Return Value

A RasterDocumentResultOptions structure that contains information about recognition results being saved.

Example

Visual BasicCopy Code
Public Sub SaveResultOptionsPropertyExample()
   ' 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()
   'assume page is added, refer to AddPage example for more information

   Dim resOpts As RasterDocumentResultOptions = New Leadtools.Document.RasterDocumentResultOptions()

   rasterDocument.RecognitionDataFileName = "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\test.rdf"
   rasterDocument.SpellLanguageId = RasterDocumentLanguage.English

   rasterDocument.Recognize(0, 1, Nothing)
   resOpts = rasterDocument.SaveResultOptions

   resOpts.Format = RasterDocumentFormatType.RtfWord2000
   resOpts.FormatLevel = RasterDocumentFormatLevel.Full

   Dim docOpts As RasterDocumentOptions = resOpts.Document
   docOpts.PaperSizeMode = RasterDocumentSelector.Predefined
   docOpts.PaperType = RasterDocumentPaperType.A4
   docOpts.MarginsMode = RasterDocumentSelector.Auto
   docOpts.LanguageMode = RasterDocumentSelector.Auto
   docOpts.Language = RasterDocumentOptionsLanguage.EnglishUS
   resOpts.Document = docOpts

   rasterDocument.SaveResultOptions = resOpts
   rasterDocument.SaveResultsToFile("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\test.doc")
   rasterDocument.Shutdown()
End Sub
C#Copy Code
public void SaveResultOptionsPropertyExample() 

   // 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(); 
 
   // assume page is added, refer to AddPage example for more information 
 
   RasterDocumentResultOptions resOpts = new RasterDocumentResultOptions(); 
 
   rasterDocument.RecognitionDataFileName = @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\test.rdf"; 
   rasterDocument.SpellLanguageId = RasterDocumentLanguage.English; 
 
   rasterDocument.Recognize(0, 1, null); 
   resOpts = rasterDocument.SaveResultOptions; 
 
   resOpts.Format = RasterDocumentFormatType.RtfWord2000; 
   resOpts.FormatLevel = RasterDocumentFormatLevel.Full; 
 
   RasterDocumentOptions docOpts = resOpts.Document; 
   docOpts.PaperSizeMode = RasterDocumentSelector.Predefined; 
   docOpts.PaperType = RasterDocumentPaperType.A4; 
   docOpts.MarginsMode = RasterDocumentSelector.Auto; 
   docOpts.LanguageMode = RasterDocumentSelector.Auto; 
   docOpts.Language = RasterDocumentOptionsLanguage.EnglishUS; 
   resOpts.Document = docOpts; 
 
   rasterDocument.SaveResultOptions = resOpts; 
   rasterDocument.SaveResultsToFile(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\test.doc"); 
   rasterDocument.Shutdown(); 
}

Remarks

The options will be used only when calling SaveResultsToFile.
For more information, refer to Working with Zones.
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