Convert EML to PDF using C# .NET & Force French Culture Localization

Hi,

Context:
I want to convert an EML to a PDF.

I followed Exporting EML to PDF - #2 by awais.hafeez, which advises to:

  1. convert from EML to MHTML with Aspose.Email

  2. convert from MHTML to PDF with Aspose.Words

The code is the following:

MemoryStream ms = new MemoryStream();

emlMessage.Save(ms, Aspose.Email.SaveOptions.DefaultMhtml);

// Convert MHTML as word doc

Aspose.Words.Loading.LoadOptions lo = new Aspose.Words.Loading.LoadOptions();

lo.LoadFormat = Aspose.Words.LoadFormat.Mhtml;

Aspose.Words.Document document = new Aspose.Words.Document(ms, lo);

// Convert Word Doc as PDF

Aspose.Words.Saving.PdfSaveOptions saveOptions = new Aspose.Words.Saving.PdfSaveOptions();

document.Save(fileStream, saveOptions);

Problem: The localization is in English, whereas I want to force it to ‘Fr-fr’.

I have used the thread-scoped setting:

Thread.CurrentThread.CurrentCulture = new CultureInfo(“fr-Fr”);

But it does not seem to be taken into account.

As an example:
the EML: source.eml
the converted PDF: dest.pdf

Question: How can I force the localization during the conversion from an EML to a PDF?

Thanks
example.zip (273.6 KB)

@qpergeline,

Can you please list the steps that we can follow on our end to verify that the localization of your “dest.pdf” is indeed in English? Also, please provide your expected PDF file showing the desired behavior here for our reference. You can create this PDF file manually from the intermediate .mhtml file by using MS Word. Also, please specify the steps that you performed in MS Word to generate the expected PDF file. We will then investigate the scenario further on our end and provide you more information.