You need to add a chinese font to your resource map. This blog post tell's you how to do that: https://www.notion.so/Generating-PDF-A-compliant-documents-01ff7b8462e0404eac21b178784cae7d
HI Hiji Du,
The Link given by Ronald is absolutely right.
Might be i can give you few more suggestions. Instead of creating a new fop.Xocnf file in your resource folder we can just copy the fop.xconf file from the Directory where mendix modelor is installed. Ex: C:\Program Files\Mendix\18.104.22.16826\runtime\lib, in this directry copy the Fop.xcponf file and paste it in your Ressource folder.
Then download the ttf files for Chinese language and place it in the Resources folder. Now open the fop.xocnf file and you should add your code in between the <fonts> </fonts> tags.
<font kerning="yes" embed-url="arialbd.ttf" embedding-mode="full">
<font-triplet name="Arial" style="normal" weight="bold"/>
<font-triplet name="ArialMT" style="normal" weight="bold"/>
The triplet name should be same as mentioned in the TTF file. you can open the ttf file and find the font name.
Note : You should downlaod the TTf for all triplets mentioned int he Xconf file.
After this set up is done, Should go to your Template document and you should add you custom css to your dynamix text in document .
font-family: ‘your font name defined in the fop.conf file’
Hope it is helpful :)
After spending lots of time R&D to make PDF display Chinese font, instead of ‘###’.
This is the result in PDF:
Changing the Default Log Level from ‘Info’ → ‘Trace’ (allow me to understand regarding how Mendix read the font-triplet name (eg. lower-case “arial unicode ms”, instead of “Arial Unicode MS”)
fyi, you will need to copy the "original fop.xconf”, and paste into your resource.
File path: ...yourproject-main\resources\fop.xconf
<font kerning="yes" embed-url="arial-unicode-ms.ttf" embedding-mode="full"> <font-triplet name="arial unicode ms" style="normal" weight="normal"/> </font>
Overview on how I apply the “arial unicode ms” to diplay Chinese word
you need to download the “Arial Unicode MS” from the internet, and then rename the file to “arial-unicode-ms.ttf” (easier to use this name)
you may read https://forum.mendix.com/link/questions/100161 to get more info.
This is the pdf content. Try to generate html and word file, they display correct.