'PHP pdf generate issue for japanese character
Hi I am using tcpdf library of PHP for creating PDF. In this I am using cid0jp font for supporting Japanese character. But after putting option for download.
Ex:
$pdf = new PDF('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetMargins(15, 27, 15);
$pdf->SetAutoPageBreak(TRUE, 25);
$pdf->SetFont('cid0jp', '', 14);
$pdf->SetMargins(30, 20);
$pdf->AddPage();
$pdf->Write($h=0, '木曜日', $link='', $fill=0, $align='C', $ln=true, $stretch=0, $firstline=false, $firstblock=false, $maxh=0);
$pdf->Output('example_002.pdf', 'D');
But after downloading the generated PDF does not have any content. Can anyone knows what is the issue?
Solution 1:[1]
"cid0jp" this font supports Japanese text.
$xmlWriter->SetFont('cid0jp', '', 14);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Praveen Kumar |