Can't set the font when converting EML to PDF

I have a .EML file and I am receiving it as a a byte stream, I am then trying to convert it to PDF.

I am running in a docker container with an alpine linux base. I am using Java. The eml file has Chinese text and for Chinese font I have font-noto-cjk.

When I convert to PDF the chinese text does not use font-noto-cjk, it uses dejavu font. If I download and add the font file SimSun.ttf then it uses this font and I can view the text. The SimSun.ttf font comes with Windows, but does not come with Alpine Linux and cannot be installed using the package manager.

How can I get groupdocs to use font-noto-cjk when converting an EML file to PDF?

@groupdocsconvert

Thank you for providing the details. To assist you further, could you please share the following information:

  1. Docker image
  2. Sample application
  3. Source file: If possible, please share a sample EML file that contains Chinese text for testing purposes.

With these details, we’ll be able to analyze the issue more effectively and provide you with appropriate guidance.

Hi, before I do that, I have a question about how the fonts get set.

I realized that EmailLoadOptions does not have a setDefaultFont. Since the EML file is using SimSun.ttf font and that font is not found, then it will use the system font which does not support Chinese characters?

@groupdocsconvert

Yes, you are right. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CONVERSIONJAVA-2015

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thank you,

Would it also be possible to add a method for setting FontSubstitutes. The emailLoadOptions does not have this method but the WordProcessingLoadOptions and PdfLoadOptions does have this method.

1 Like

@groupdocsconvert

Thank you for bringing this to our attention. We will further investigate the matter and keep you informed of any updates or findings.

1 Like