I'm having trouble opening a document with a stream using Apose.Words...
I'm creating a document and saving its contents to a column in the database. I would then like to retreive the DB column and use its content to open the document at a later date...
I'm successfully using the following code to save the document to the DB::
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
MemoryStream ms = new MemoryStream();
string dbColumn= System.Text.Encoding.ASCII.GetString(ms.ToArray());
I'm using the following code to open the document from a stream using the column from the database:
byte buffer = System.Text.Encoding.ASCII.GetBytes(dbColumn);
MemoryStream ms2 = new MemoryStream(buffer);
Document doc2 = new Document(ms2, string.Empty, LoadFormat.FormatDocument, string.Empty);
Unfortunately, the call to Document() results in the following error: "This is not a structured storage file."
Any idea why this is happening? Any help would be greatly appreciated...