Пример #1
0
 public string Read(DataFileModel dataFile)
 {
     encode = EncodingType.GetType(dataFile.Data);
     if (encode != null)
     {
         return(encode.GetString(dataFile.Data));
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
 public string Read(DataFileModel dataFile)
 {
     try
     {
         using (WordDocument document = new WordDocument(new MemoryStream(dataFile.Data), FormatType.Automatic))
         {
             return(document.GetText().Substring(61)); // удаляем первые 62 символа, так как там записано - Created with a trial version of Syncfusion Essential DocIO.\r\n;
         }
     }
     catch (System.Exception)
     {
         return(null);
     }
 }