3

I am working on Multilingual pdf generation. I am using tcpdf version 5.9.20, and font helvetica and it's working fine for English character, but displaying ???????? for Japanese character.

I also tried arialunicid0 font as suggested here http://community.impresscms.org/modules/newbb/viewtopic.php?post_id=43480 . However, it is forcing users to download lang-package.

Roopendra
  • 7,674
  • 16
  • 65
  • 92

2 Answers2

9

Try font "cid0jp", it can probably solve your problem.

I succeed in displaying Japanese and Chinese characters by using this font. It can be found in tfpdf's package.

Qian JIN
  • 186
  • 4
  • Thanks Qian..Yes. I have already implemented this solutions but it will force me to download language pack for adobe reader. Do you know any solutions which will not force user to force any language pack. – Roopendra Jan 14 '13 at 11:39
  • Hi Roopendra, I'm in search of a better solution too. Sorry can't offer more help – Qian JIN Jan 15 '13 at 13:02
  • @QianJIN : I just answered this question http://stackoverflow.com/questions/14379119/how-to-generate-multilangual-content-pdf-in-php/14455940#14455940 maybe it helps. – devOp Jan 22 '13 at 10:07
  • @devOp Thanks!I'll check your solution out! – Qian JIN Jan 22 '13 at 21:29
  • 1
    kozgopromedium also works well for Japanese. Additionally, it works with TCPDF – Rakesh Shewale Mar 16 '17 at 07:02
3

Most fonts will not work for Japanese, since it needs thousands of characters (whereas English is satisfied with a hundred or so). Developing thousands of characters is expensive, thus Japanese fonts are expensive; and storing thousands of characters takes up space, which makes Japanese fonts multimegabyte. Therefore most Japanese still usually don't use custom fonts, and rely on the preinstalled fonts that come with the OS (or in one of OS-supported packages). Being a graphics designer is kind of expensive in Japan. Those that intend their documents for digital distribution (HTML, PDF) simply do not use any custom fonts.

Amadan
  • 191,408
  • 23
  • 240
  • 301
  • So is there any way to generate multilingual PDF using TCPDF? – Roopendra Dec 26 '12 at 09:02
  • 1
    I haven't tried, but... This might be a good starting point: http://stackoverflow.com/questions/12888991/tcpdf-do-not-display-chinese-on-linux-client (also note a comment about the Japanese on the second answer, and links to similar questions). Good luck. – Amadan Dec 26 '12 at 11:54
  • 1
    Here are also some information about this topic: http://stackoverflow.com/questions/14379119/how-to-generate-multilingual-content-pdf-in-php/14455940#14455940 – devOp Feb 01 '13 at 13:00