using (FileStream content = new FileStream("test1.tif", FileMode.Open))
{
ImGearPage igPage = ImGearFileFormats.LoadPage(content, 0);
ImGearRecPage recPage = igRecognition.ImportPage((ImGearRasterPage)igPage);
recPage.Image.Preprocess();
recPage.Recognize();
igRecognition.OutputManager.CodePage = "Windows ANSI";
igRecognition.OutputManager.DirectTextFormat = ImGearRecDirectTextFormat.FormattedText;
if (File.Exists("singlePage.TXT"))
{
File.Delete("singlePage.TXT");
}
igRecognition.OutputManager.WriteDirectText(recPage, "singlePage.TXT");
recPage.Dispose();
}
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