Values that specify the options that will be used when saving recognition results
to a file.
Syntax
Example
Visual Basic | Copy Code |
---|
Public Sub SaveResultOptionsPropertyExample()
RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey")
Dim rasterDocument As RasterDocumentEngine
rasterDocument = RasterDocumentEngine.Instance
rasterDocument.Startup()
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
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