I am using TCPDF latest version (6.7.5) to export PDF documents. In the document there are some Japanese kanji characters that cannot be displayed.
I have tried using fonts like cid0jp, cid0cs, cid0cs, arialuni, … but it still doesn’t work. I also download Japanese fonts and add them to the library but the result is still the same. Below is the demo.php file and the result is an empty pdf file:
<?php
require_once('tcpdf/tcpdf.php');
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$string = "???? ???? ???? ???? ???? ???? ???? ???? ???? ????";
$pdf->SetFont('cid0jp', '', 12);
$pdf->Cell(190, 10, $string, 0, 11);
$pdf->Output();
Please give me some advice or some examples for my case. Thanks a lot.
Thịnh Nguyễn Xuân is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.