ImageGear22.Recognition Assembly > ImageGear.Recognition Namespace > ImGearRecOutputManager Class > WriteDirectText Method : WriteDirectText(ImGearRecPage,String) Method |
'Declaration Public Overloads Sub WriteDirectText( _ ByVal page As ImGearRecPage, _ ByVal file As String _ )
'Usage Dim instance As ImGearRecOutputManager Dim page As ImGearRecPage Dim file As String instance.WriteDirectText(page, file)
public void WriteDirectText( ImGearRecPage page, string file )
public: void WriteDirectText( ImGearRecPage* page, string* file )
public: void WriteDirectText( ImGearRecPage^ page, String^ file )
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