modiDocument.OCR(MiLANGUAGES.miLANG_ENGLISH);
private void button1_Click(object sender, EventArgs e) { //string filePath = Server.MapPath("~/Uploads/" + Path.GetFileName(FileUpload1.PostedFile.FileName)); //FileUpload1.SaveAs(filePath); string filePath = ("image\an91cut.jpg"); string extractText = this.ExtractTextFromImage(filePath); label1.Text = extractText.Replace(Environment.NewLine, "<br />"); } private string ExtractTextFromImage(string filePath) { Document modiDocument = new Document(); modiDocument.Create("C:\\Users\\אפרת\\Desktop\\oo.png"); modiDocument.OCR(MiLANGUAGES.miLANG_ENGLISH); MODI.Image modiImage = (modiDocument.Images[0] as MODI.Image); string extractedText = modiImage.Layout.Text; modiDocument.Close(); return extractedText; }
modiDocument.Images
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)