public bool ConvertToDoc(string source, string target) { try { AsposeConverter ac = new AsposeConverter(); return ac.ConvertToDoc(source, target); } catch (Exception e) { // TODO: Add logging return false; } }
public int ConvertToDocPwd(string source, string target, string password) { try { AsposeConverter ac = new AsposeConverter(); ac.ConvertToDocPwd(source, target, password); return (int)ConverterMessages.OK; } catch (Exception e) { if (e is IncorrectPasswordException) { return (int)ConverterMessages.IncorrectPassword; } else { return (int)ConverterMessages.Error; } } }
public int ConvertToRtfEx(string source, string target) { try { AsposeConverter ac = new AsposeConverter(); ac.ConvertToRtf(source, target); return (int)ConverterMessages.OK; } catch (System.Exception e) { if (e is IncorrectPasswordException) { return (int)ConverterMessages.IncorrectPassword; } else { return (int)ConverterMessages.Error; } } }