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

    Hi,

    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

    Thanks!

    #27376

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

    #27377

    Hi,
    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.

    #27378

    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-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html

    PD4ML examples pack (http://pd4ml.com/examples.zip) includes chinese_ttf sample, which illustrates the TTF embedding feature.

    #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.

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

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