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

Free Support Forum - aspose.com

Hindi font text issue in EML to PDF transformation (Java) ECDCTS-6556

Hi Team,
On transforming an EML file to PDF, the output is obtained with incorrect font. Following code was used for processing:

    MailMessage message = MailMessage.load("C:\\Users\\Administrator\\Desktop\\HindiFont.eml");
    MhtSaveOptions mhtSaveOptions = new MhtSaveOptions();
    mhtSaveOptions.setMhtFormatOptions(MhtFormatOptions.WriteHeader | MhtFormatOptions.HideExtraPrintHeader|MhtFormatOptions.DisplayAsOutlook);
    String mhtFile = "C:\\Users\\Administrator\\Desktop\\Hindi_Font.mhtml";
    message.save(mhtFile, mhtSaveOptions);
    HtmlLoadOptions loadOptions = new HtmlLoadOptions();
    Document document = new Document(mhtFile,loadOptions);

Attaching the input and outfput files here: Aspose.zip (75.0 KB)



I have observed the rendering issue with Mangal Hindi font in exported MHTML and subsequently in generated PDF too. A ticket with ID EMAILJAVA-34713 has been created to investigate and resolve the issue. We will share notification with you as soon as the issue will be fixed.

Hi @mudassir.fayyaz,
Can you please check with the engineering team and provide us an update?



The issue has just recently been created in our issue tracking system and is pending for investigation. We will share the good news with you as soon as it will be fixed.

Hi @mudassir.fayyaz,
Can you please check with engineering team and provide us an update?



We have internally verified the issue w.r.t Aspose.Email and it does not seems to be an issue with API as we exported the EML file to MHT using MS Outlook and then used Aspose.Words to save that as PDF. That too hindi font issue in exported PDF. I have requested concerned team to take on further from here and will assist her shortly.


We have tested the scenario and noticed the Hindi text is rendered incorrectly in output PDF. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-20770 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.


It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-20770) as ‘Not a Bug’.

Please read the following article and use the following code example to get the desired output.

Enable OpenType Features

var doc = new Aspose.Words.Document( "hindi.html");
doc.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;