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

Free Support Forum - aspose.com

Problem with special characters while converting MSG in PDF

Hello,

I’m trying to convert MSG message in PDF. All works fine but when MSG files contains accented letters the characters are are not displayed correctly.
This is the code that I’m using:

Dim mailMsg As Aspose.Email.Mail.MailMessage
Using msMHTML As New MemoryStream()
mailMsg.Save(msMHTML, Aspose.Email.Mail.SaveOptions.DefaultMhtml)

Dim loadOptions as New Aspose.Words.LoadOptions()
loadOptions.LoadFormat = Aspose.Words.LoadFormat.Mhtml

Dim document = New Aspose.Words.Document(msMHTML, loadOptions)
Dim saveOptions = New Aspose.Words.Saving.PdfSaveOptions()
document.Save(“OUTPUT”, saveOptions)
End Using

I verified that is the MHTML conversion that generate corrupted characters, so the problem is in the first conversion, from MSG to MHTML. I’m using Aspose Email 5.3.0.0.

Is there another way to convert MSG to PDF?

Thanks,
Alessandro

Hi Alessandro,


Thank you for writing to Aspose support team.

I have tested your sample code with one of the EML file containing accented characters in subject and body. No issue is observed and intermediate Mhtml file and PDF file are generated without any problem.

Could you please provide your sample EML file that can be used here to re-produce the scenario and provide assistance accordingly?
Hi,
I've attached a ZIP with a sample EML and with the .mhtml conversion.
The code that you can use to reproduce the error is very simple:

Dim msg As Aspose.Email.Mail.MailMessage = _
Aspose.Email.Mail.MailMessage.Load(EML_PATH)
msg .Save(MHTML_OUTPUT_PATH, Aspose.Email.Mail.SaveOptions.DefaultMhtml)
The wrong character is in the phrase:

Il problema riscontrato è il seguente

Alessandro

Hi Alessandro,

Thank you for sharing the sample file.

We were able to reproduce the issue at our end and have logged it as EMAILNET-34947 in our issue tracking system. Our Product team will investigate the issue upon its turn and once there is some update available about it, we’ll notify you here via this tread.

The issues you have found earlier (filed as EMAILNET-34947) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.