Hi,
We are having issue while reading the bytes from the document created using aspose and convet that to string.
This Code Works:
byteArray = System.IO.File.ReadAllBytes(Docpath) --> Normal word Document without Aspose
byteString = System.Text.Encoding.UTF8.GetString(byteArray);
Below code is not working:
Document doc = new Document(Docpath) // Using Aspose
/* Lock the document */
doc.Protect(ProtectionType.ReadOnly);
/*Save the document back */
doc.Save(docPath);
Now read the bytes and convert to string:
byteArray = System.IO.File.ReadAllBytes(Docpath) --> Aspose word Document
byteString = System.Text.Encoding.UTF8.GetString(byteArray); --> Not Working
Can you please assist?
Thanks,
Hari