Hi ,
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");
MemoryStream memStream1 = new MemoryStream();
doc.Save(memStream1, SaveFormat.AsposePdf);
memStream1.Seek(0, SeekOrigin.Begin);
//Load the document into an XmlDocument
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(memStream1);
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
MemoryStream memStream2 = new MemoryStream();
pdf.BindXML(xmlDoc, null);
pdf.Save(memStream2);