How to generate PDF file in Japanese correctly

0
Hello. When I generate PDF file, PDF file doesn’t display Japanese correctly. Japanese texts are replaced by ###.   In the microflow, I retrieved $currentUser/User_Language by association. And, I configured Language on Generate document. However, It’s impossible to display Japanese on PDF file. Does anyone know how to solve this problem? Thank you in advance. ※I already checked this forum question(https://community.mendix.com/link/questions/92557) , but I can select just three fonts (Helvetica, Times, Courier).   
asked
4 answers
1

Add a custom font which has support for Japanese to your project following https://docs.mendix.com/refguide/style#custom-fonts.

In the ‘Custom styles’ tab of the cells which need it define font-family: ‘your font’ ;

answered
0

Hi,
Document Templates probably do not work because you are missing fonts for Japanese.
A simpler solution might be to use another document generation tool like https://appstore.home.mendix.com/link/app/114043/

Hope this helps

answered
0

You must add one of these fonts, I dont remember exactly which one yahei probably, that supports Japanese

Then follow https://docs.mendix.com/refguide/style#custom-fonts as Sjors already mentioned.

Then in the document properties, you can include the font like. This will make sure the font is available for entire document. 

answered
0

 

Font Noto Sans JP from Google (https://fonts.google.com/noto/specimen/Noto+Sans+JP?query=Japanese) worked for me.

Used this in the fop.xconf:

        <font kerning="yes" embed-url="NotoSansJP-Regular.otf">
            <font-triplet name="noto sans jp" style="normal" weight="normal"/>
        </font>

Used this in Custom Styles:

Make sure you put the NotoSansJP-Regular.otf file in your project’s resources folder.

answered