tcpdf encode chinese character

前端 未结 4 526
隐瞒了意图╮
隐瞒了意图╮ 2021-01-13 12:43

I am using tcpdf to create a pdf, but it cant show chinese character, instead it just show square box. I used this example that provided by them and then changed the cache/u

相关标签:
4条回答
  • 2021-01-13 13:10

    I managed to get it to work with the Arial Unicode font.

    $pdf->SetFont('arialuni', '', 12);
    

    Only issue is it's $165 http://www.fonts.com/font/ascender/arial-unicode

    0 讨论(0)
  • 2021-01-13 13:25

    You need to use unicode supporting font, like you can use stsongstdlight font for chinese. Hope it helps

    0 讨论(0)
  • 2021-01-13 13:26

    try this

    $pdf->SetFont('kozminproregular', '', 12);
    

    It just helped me. Hope it also helps u.

    0 讨论(0)
  • 2021-01-13 13:28

    I found this copy all files to tcpdf/fonts and now I can just use it with $pdf->SetFont('DroidSansFallback', '', 8, '', false);

    0 讨论(0)
提交回复
热议问题