public static string OcrPdf(Hljsimage himg, List <string> fcount, string path, int xc, string boxsn, string archno) { string str = "ok"; for (int pdf = 0; pdf < fcount.Count; pdf++) { string yfile = fcount[pdf]; string fname = Path.GetFileNameWithoutExtension(yfile); string filename = Path.Combine(path, fname + ".pdf"); str = himg._AutoPdfOcr2(yfile, filename, ClsFrmInfoPar.OcrPath, 1); if (str.IndexOf("错误") >= 0) { str = himg._AutoPdfOcr2(yfile, filename, ClsFrmInfoPar.OcrPath, 2); if (str.IndexOf("错误") >= 0) { if (ClsFrmInfoPar.Ocrpdf) { str = himg.Autopdf(yfile, filename); if (str.IndexOf("错误") >= 0) { return(str); } } else { return(str); } } } } return(str); }
private void FrmOcr_Shown(object sender, EventArgs e) { Himg = new Hljsimage(); combOcr.SelectedIndex = 0; Task.Run(new Action(() => { LoadModule(); })); }