ImageGear for .NET
Recognizing a Single-Page Document
C#
Copy Code
ImGearPage igPage;
using (FileStream localFile = new FileStream("test1.tif",FileMode.Open))
     igPage = ImGearFileFormats.LoadPage(localFile, 0);
ImGearRecPage igRecPage = igRecognition.ImportPage((ImGearRasterPage)igPage);
imGearPageView1.Page = igPage;
igRecPage.Image.Preprocess();
igRecPage.Recognize();
igRecognition.OutputManager.CodePage = "Windows ANSI";
igRecognition.OutputManager.Level = ImGearRecOutputLevel.AUTO;
igRecognition.OutputManager.Format = "Converters.Text.Word2000";
ImGearRecDocument document = ImGearRecDocument.Create(null);
document.InsertPage(igRecPage, -1);
igRecognition.OutputManager.WriteDocument(document, "singlePage.doc");
document.Dispose();
VB .NET
Copy Code
Dim igPage As ImGearPage
Using localFile As New FileStream("test1.tif", FileMode.Open)
      igPage = ImGearFileFormats.LoadPage(localFile, 0)
End Using
Dim igRecPage As ImGearRecPage = igRecognition.ImportPage(DirectCast(igPage, ImGearRasterPage))
imGearPageView1.Page = igPage
igRecPage.Image.Preprocess()
igRecPage.Recognize()
igRecognition.OutputManager.CodePage = "Windows ANSI"
igRecognition.OutputManager.Level = ImGearRecOutputLevel.AUTO
igRecognition.OutputManager.Format = "Converters.Text.Word2000"
Dim document As ImGearRecDocument = ImGearRecDocument.Create(Nothing)
document.InsertPage(igRecPage, -1)
igRecognition.OutputManager.WriteDocument(document, "singlePage.doc")
document.Dispose()

 

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback