private void SelectAbbyyEngine() { if (_abbyy == null) { try { AbbyyLoader loader = new AbbyyLoader(@"C:\Program Files (x86)\Atalasoft\DotImage 10.7\bin\OCRResources\ABBYY"); if (loader != null) { // try to create an Abbyy engine _abbyy = new AbbyyEngine(); InitializeEngine(_abbyy); } } catch (AtalasoftLicenseException ex) { LicenseCheckFailure("Using Abbyy OCR requires both an Atalasoft DotImage OCR License.", ex.Message); } catch (Exception err) { InfoBox(err.Message); } } if (_abbyy != null) { _engine = _abbyy; UpdateMenusForEngine(); } }
private void OnMenuAbbyyClick(object sender, EventArgs e) { try { // TODO: you may want to change the location of ABBYY OCR resource files below var currentFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var loader = new AbbyyLoader(Path.Combine(currentFolder, "Abbyy")); if (loader.Loaded) { SelectAbbyyEngine(); } else { InfoBox("Unable to load ABBYY OCR engine resource files. Make sure that you downloaded the engine as described in KB article: http://www.atalasoft.com/KB/Article.aspx?id=10432"); } } catch (AtalasoftLicenseException ex) { LicenseCheckFailure("Using ABBYY OCR requires a DotImage OCR License.", ex.Message); } }