I have a C# web application that pulls Word documents out of a database and converts them to PDF and appends them into one large PDF. The Word documents are stored as image files in a SQL database and converted to a byte array in C#. I instantiate a Stream object with the byte array and use the stream to instantiate a new Aspose.Words.Document.
System.IO.Stream docStream = new System.IO.MemoryStream(byteArrayOfWordDoc);
Aspose.Words.Document wordsDoc = new Aspose.Words.Document(docStream);
If the Word document that is stored in the database in marked Read-Only, I get the following error when trying to instantiate the Aspose.Words.Document class:
The document appears to be corrupted and cannot be loaded.
I can, however, separately pull this Word document from the database and view it in Word, so I know it is not corrupted. Do I get this error because the Word document is marked read-only? Is there a way to deal with read-only documents to allow me to convert it into a PDF or is this a permissions issue?
Thanks,
Tom