Khmer UI Font issue on PDF

Hello, I have a word document with different languages including Khmer. It looks fine in the word document, however, after saving as PDF, the Khmer section is just boxes. I read other Khmer issues on the forum, but I can’t quite make out what the resolution was. And I can’t access the zip file that was provided to the other customers.

Please see attached zip file. I also included a log where I dumped all of the fonts associated with that word document just before saving as pdf. Thank you!!!

Slime-KhmerPdfIssue.zip (377.4 KB)

@Slime2024 Usually, the such problems occur because the fonts used in your input document are not available on the machine where document is converted to PDF. The fonts are required to build document layout. If Aspose.Words cannot find the font used in the document, the font is substituted . This might lead into fonts mismatch and document layout differences due to the different fonts metrics. You can implement IWarningCallback to get notifications when font substitution is performed.
Please see our documentation to learn where Aspose.Words looks for fonts:
https://docs.aspose.com/words/net/specifying-truetype-fonts-location/

I have tested conversion to PDF on my side and cannot reproduce the problem.
out.pdf (137.7 KB)

Thank you. On my windows laptop, in Word, the fonts dropdown has a little cloud icon on the fonts that are not installed.

Clicking on the cloud downloads the font to “C:\Users<name>\AppData\Local\Microsoft\FontCache\4\CloudFonts”

Then I went into the Khmer UI folder, right clicked on each .ttf file and chose to install for all users. This installs the font in the C:\Windows\Fonts.

Then I ran the Aspose assembly locally and the PDF now shows the font as expected for the Khmer language.

Thanks again for your help!! I will install the fonts on the servers where our assemblies run.

@Slime2024 It is perfect that you managed to resolve the problem. Please feel free to ask in case of any other issues, we are always glad to help you.

1 Like