Using content As New FileStream("test1.tif", FileMode.Open)
Dim igPage As ImGearPage = ImGearFileFormats.LoadPage(content, 0)
Dim recPage As ImGearRecPage = igRecognition.ImportPage(DirectCast(igPage, ImGearRasterPage))
recPage.Image.Preprocess()
recPage.Recognize()
igRecognition.OutputManager.CodePage = "Windows ANSI"
igRecognition.OutputManager.DirectTextFormat = ImGearRecDirectTextFormat.FormattedText
If File.Exists("singlePage.TXT") Then
File.Delete("singlePage.TXT")
End If
igRecognition.OutputManager.WriteDirectText(recPage, "singlePage.TXT")
recPage.Dispose()
End Using