ResultOptions Example for Visual Basic
Private Sub Command21_Click()
Dim nRet As Integer
RasterDoc.EnableSaveResultsToMemory = False
RasterDoc.RecognitionDataFileName = "c:\test.rdf"
RasterDoc.SpellLanguageID = LANGID_ENGLISH
nRet = RasterDoc.Recognize (0, 1)
If nRet = 0 Then
RasterDoc.GetRecognitionResultOptions
RasterDoc.ResultOptions.Format = DOCRTF_WORD_2000
RasterDoc.ResultOptions.FormatLevel = FORMATLEVEL_FULL
RasterDoc.ResultOptions.DocumentOptions.PaperSizeMode = SELPREDEFINED
RasterDoc.ResultOptions.DocumentOptions.PaperType = PAPER_A4
RasterDoc.ResultOptions.DocumentOptions.MarginsMode = SELAUTO
RasterDoc.ResultOptions.DocumentOptions.LanguageMode = SELAUTO
RasterDoc.ResultOptions.DocumentOptions.ResultLanguage = LANGOUT_ENGLISH_US
RasterDoc.SetRecognitionResultOptions
nRet = RasterDoc.SaveDocument ("c:\\test.doc")
If (nRet = 0) Then
MsgBox ("The recognition results saved to a file")
End If
End If
End Sub