TCPDF UTF-8. Lithuanian symbols not showing up

前端 未结 15 728
-上瘾入骨i
-上瘾入骨i 2020-12-01 06:47

Im using latest TCPDF version(5.9). But have some strange problems with encoding. I need Lithuanian language symbols like: ąčęėįšųūž. But get only few of it. Other remain li

15条回答
  •  无人及你
    2020-12-01 07:13

    Set the $unicode parameter on the TCPDF constructor to false and the $encoding parameter to 'ISO-8859-1' or some other character map.

    This will help you:

    Default for UTF-8 unicode:

    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
    

    Example of constructor for European charset:

    $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);
    

提交回复
热议问题