Subscribe to Subscribers
Talk to Webmaster Tony John


Resources » Code Snippets » ASP.NET WebForms

Convert image to text


Posted Date:     Category: ASP.NET WebForms    
Author: Member Level: Gold    Points: 5



 


Description :
This code shows how to Convert image to text

Here is the code :

//create object of MODI document
MODI.Document doc = new MODI.Document();
//Initialise and create the document
doc.Create(FileUpload1.PostedFile.FileName);
//Process the sacnned image with specified language
doc.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, false, true);
MODI.Layout layout = ((MODI.Image)doc.Images[0]).Layout;

string str = String.Empty;
//Extract the letters and read
for (int i = 0; i < layout.Words.Count; i++)
{
MODI.Word word = (MODI.Word)layout.Words[i];
if (str.Length > 0)
{
str += " ";
}
str += word.Text;
}
doc.Close(false);





Did you like this resource? Share it with your friends and show your love!


Responses to "Convert image to text"
Guest Author: Imran     18 Apr 2012
Hi,
Nice information,can you please guide me how to use this code in visual studio 2008 in c# Application.Thanks in advance.


Regards
Imran Paracha



Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Next Resource: File Upload Control
    Previous Resource: Mail sending in Asp.net
    Return to Resources
    Post New Resource
    Category: ASP.NET WebForms


    Post resources and earn money!
     
    More Resources
    Popular Tags   Tag posting guidelines   Search Tags  
    Convert image to text  .  



    Follow us on Twitter: https://twitter.com/dotnetspider

    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.