//Check for JPG File Format if (fileExtension == ".jpg" || fileExtension == ".JPG") // or // ImageFormat.Jpeg.ToString() { try { //OCR Operations ... MODI.Document md = new MODI.Document(); md.Create(Convert.ToString(files.Current)); md.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, falsefalse);getting error in this linehow to solve this MODI.Image image = (MODI.Image)md.Images[0]; StringWriter output = new StringWriter(); string temp; temp = image.Layout.Text; bool tr = temp.Contains(content_txt.Text); if (tr) { using (SqlCeConnection con = cm.GetConnection()) { string temp11 = files.Current.ToString(); string tempfilename = Path.GetFileName(temp11); string sql = "SELECT Documents.wardrobe AS Stack_name,Documents.rack AS Rack_Name,Documents.filename As File_Name,Documents.title As Title,Documents.document_type AS Document_Type,Documents.tag1 AS Tag1, Documents.tag2 AS Tag2, Documents.tag3 AS Tag3, Documents.tag4 AS Tag4, Documents.date AS Created_Date from Documents where Documents.title='" + tempfilename + "' and Documents.tag1 like'" + keyword + "%' or Documents.tag2 like'" + keyword + "%' or Documents.tag3 like '" + keyword + "%' or Documents.tag4 like'" + keyword + "%';"; sql11 = sql; SqlCeCommand cmd = new SqlCeCommand(sql, con); SqlCeDataAdapter da = new SqlCeDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); DataTable dt = ds.Tables[0]; finaltable.Merge(dt); } } } catch (Exception) { //uncomment the below code to see the expected errors } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)