Hi,
Context:
I want to convert an EML to a PDF.
I followed Exporting EML to PDF - #2 by awais.hafeez, which advises to:
-
convert from EML to MHTML with Aspose.Email
-
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)