To read all text of all font-family of particular image using MODI in c# asp.net
<p>I have written code for converting text from image using MODI as follows:</p>

<pre><code>public void CheckFileType(string directoryPath)
{
    IEnumerator files = Directory.GetFiles(directoryPath).GetEnumerator();
    while (files.MoveNext())
    {
        //get file extension 
        string fileExtension = Path.GetExtension(Convert.ToString(files.Current));

        //get file name without extenstion 
        string fileName = Convert.ToString(files.Current).Replace(fileExtension, string.Empty);

        try
        {
            //OCR Operations ... 
            MODI.Document md = new MODI.Document();
            md.Create(Convert.ToString(files.Current));
            md.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);                
            MODI.Image image = (MODI.Image)md.Images[0];

            //create text file with the same Image file name 
            FileStream createFile = new FileStream(fileName + ".txt", FileMode.CreateNew);

            //save the image text in the text file 
            StreamWriter writeFile = new StreamWriter(createFile);
            writeFile.Write(image.Layout.Text);
            writeFile.Close();
        }
        catch (Exception)
        {
            //MessageBox.Show("This Image hasn't a text or has a problem", 
            //"OCR Notifications", 
            //MessageBoxButtons.OK, MessageBoxIcon.Information); 
        }

    }
}

protected void btnbrowse_Click(object sender, EventArgs e)
{
    CheckFileType(@"C:\OCR");
}
</code></pre>

<p>It works fine. But the problem is it does not recognize all the text from image.
Please help me.</p>
