We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting Unknown file format expection from aspose.word dll

Hi,

I am getting "unknown file format" exception from aspose word dlls when i am trying to convert the stream object to document.

Please see the belwo code:

stream = new MemoryStream(); // read xml in memory

writer = new StreamWriter(stream, Encoding.Unicode);

Documentum_Srvc.HCDocumentumService sr = new CreateDocument.Documentum_Srvc.HCDocumentumService();

DataObject Remote_Xml = sr.retrieveDocument(DocumentID);

byte[] _ByteArray = ObjectToByteArray(Remote_Xml);

if (_ByteArray != null)

{

MemoryStream doc_stream = new MemoryStream(_ByteArray);

SaveStreamToFile(@"C:\Documents and Settings\898588\Desktop\aspose-docs\New Folder\New Folder\\mystream.txt", doc_stream);

doc_stream.Position = 0;

yesdoc = new Document(doc_stream); //here i am getting the exception

yesdoc.Save(@"C:\Documents and Settings\898588\Desktop\aspose-docs\New Folder\New Folder\\Documentum.docx");

}

return yesdoc;

I have saved the stream object in to one file and attached it here for your reference.

pls help me.

Hi


Thanks for your inquiry. I answered your question here:
<a href="https://forum.aspose.com/t/65730

Best regards,