PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) PD4ML Tips & Tricks Conversion issue with Chinese characters Re: Re: Conversion issue with Chinese characters

#27379

In my experience, there are several things you need to do to get Chinese characters to be recognised:

i.) Set the encoding to be UTF-8
ii.) Within your pd4fonts.properties, make sure you have correctly listed your font. A font has a file name that will end in .ttf and an internal name that you discover by clicking on the file. If that internal font name has spaces in it, then you need to insert a character before every space. (But the spaces still appear.) The .ttf file should be located in the same directory as the ‘pd4fonts.properties’.
iii.) Finally, in the code that generates your PDF, you need to execute the PD4ML method ‘setDefaultTTF()’, using the internal font name.