Hi,
I evaluate the Aspose-converter and try to convert .msg-files to pdf.
As proposed in the help-file I convert the msg-files to mhtml and then
via word-converter to pdf.
The problem is, that in my pdf-file, I do not see, just the message-text, but also
all of the html-tags (,
…).
How can I suppress the tags, so that I can simply view the text?
Any help appreciated.
best regards,
Oliver
Hi Oliver,
Hi,
sure, here is the source for my conversion:
sInStream = ReadFile2Stream(sInFile);
…
Aspose.Network.Mail.MailMessage mail = Aspose.Network.Mail.MailMessage.Load(sInStream);
System.IO.MemoryStream mstream = new System.IO.MemoryStream();
mail.Save(mstream, MailMessageSaveType.MHtmlFromat);
MemoryStream ms = new MemoryStream();
Document document = new Document(mStream);
Aspose.Words.Saving.SaveOptions saveOptions = Aspose.Words.Saving.SaveOptions.CreateSaveOptions(sOutFileName);
saveOptions.PrettyFormat = true;
document.Save(ms, Aspose.Words.SaveFormat.Pdf);
FileStream fs = File.OpenWrite(sOutFileName);
ms.WriteTo(fs);
fs.Flush();
fs.Close();
And in the provided zip-file, you will find a sample msg-file and the resulting pdf.
thank you for your help!
best regards,
Oliver
Hi Oliver,
thank you for the hint. It really looks fine now!
The problem is solved!
best regards,
Oliver