Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #26224


    I am using the latest java version of pd4ml and noticed that utf-8 encoded html pages with Chinese characters are not converted properly. The chinese characters appear like ??? in the generated pdf. Please let me know how to fix it.

    PS: I am using command line execution on unix



    ??? characters instead of CJK glyphs may appear in two cases:


    I’m a korean software programmer and one of your library users.
    I have a problem that I can’t see the Korean characters when I using demo version of pd4ml java library.
    is it because of demo version?
    please reply to me as soon as possile.
    thank you.


    A solution for the missing Korean characters problem is exactly the same as for the Chinese: you need to make sure, that you use PD4ML Pro (it does not matter if that commercial or evaluation version) and TTF embedding is correctly configured:


    PD4ML examples pack ( includes chinese_ttf sample, which illustrates the TTF embedding feature.


    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, 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 ‘’.
    iii.) Finally, in the code that generates your PDF, you need to execute the PD4ML method ‘setDefaultTTF()’, using the internal font name.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘PD4ML Tips & Tricks’ is closed to new topics and replies.