Example #1
0
 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;
     }
 }
Example #2
0
 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;
         }
     }
 }
Example #3
0
 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;
         }
     }
 }