/// <summary> /// Does the full conversion process of initializing OmniPage, /// and all its settings. Then converting the PDF document, /// and writing out a status file. /// </summary> /// <param name="p_pdfFileName">fullpath to PDF file</param> public static void convertPdftoWord(String p_pdfFileName, String language) { Omni converter = new Omni(); try { converter.initOmniPage(); converter.setOcrSettings(language); converter.performOcr(p_pdfFileName); converter.writeSuccessStatus(); } catch (Exception e) { Logger.LogError("Failed to convert PDF to Word", e); converter.writeErrorStatus(e); } finally { converter.deleteInputFile(); } }
/// <summary> /// Implements Converter.Convert(). See GlobalSight.Converter /// for more information. /// This method delegates to Omni to invoke ScanSoft OmniPage12 /// to do the PDF->Word conversion. /// </summary> public void Convert(string p_filename, string p_srcLanguage) { Omni.convertPdftoWord(p_filename, p_srcLanguage); }