I am trying to convert document to PDF by using streams and attaching final stream as mail attachment but pdf is not converting and get incorrect format message while opening the attachment. Please help me.
Aspose.Words.Document doc = new Aspose.Words.Document(@"C:\Documents and Settings\cmylavarapu\My Documents\document.doc");
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for considering Aspose.
Please close the MemoryStream objects, before using them as attachment. Try appending the following code lines at the end of code snippet that is converting Word file into Pdf.
memStream1.Close();
memStream2.Close();
I have tested the issue and have tried saving the resultatn file to hard-drive and its working properly. Please make sure you are using the latest version of Aspose.Pdf. In case the issue still parsists, please share the resource word file, so that we can test the issue at our end.