PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Conversion issue with Chinese characters
   PostPosted: 14 Jul 2009, 23:54 
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!


  Subject: Re: Conversion issue with Chinese characters
   PostPosted: 16 Jul 2009, 14:21 
??? characters instead of CJK glyphs may appear in two cases:


  Subject: Re: Re: Conversion issue with Chinese characters
   PostPosted: 17 Jul 2009, 03:17 
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.


  Subject: Re: Conversion issue with Chinese characters
   PostPosted: 19 Jul 2009, 14:50 
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.


  Subject: Re: Conversion issue with Chinese characters
   PostPosted: 01 Apr 2010, 17:00 
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.



[Reply]     [ 5 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share