We are using a combination of email-java and words-java to convert an email to PDF. We had a working version, but it did not handle Asian character sets.
We added a font source:
LoadOptions options = new LoadOptions();
options.setLoadFormat(loadFormat);
FolderFontSource intradynFontSource =
new FolderFontSource("/vault/compliancevault/cv/emails/export/webcore/fonts",
true);
try {
Document pdf = new Document(is, options);
pdf.setFontSettings(new FontSettings());
pdf.getFontSettings().
setFontsSources(new FontSourceBase[]{intradynFontSource});
pdf.save(dest, SaveFormat.PDF);
}
It handled the text, but the headers got out of line:
Screenshot from 2021-09-23 17-22-25.png (28.6 KB)
This happens for all email, whether they contain odd characters or not.