1

I want to generate PDF which will have Chinese and English. Literally it has to be supported in all language.

I am using html2pdf, I tried many options but not working.

This is my code, tried with different fonts. It takes the font but not printing correctly. Printing some spacial characters instead.

         $html2pdf = new HTML2PDF('P', 'A4', 'en', true, 'UTF-8');

        $html2pdf->setDefaultFont('arialunicid0'); //using this line
        // display the full page
        $html2pdf->pdf->SetDisplayMode('fullpage');

        // convert
        $html2pdf->writeHTML($content, isset($_GET['vuehtml']));
Sanju Kaniyamattam
  • 501
  • 1
  • 4
  • 14

1 Answers1

0

you can create other languages page in HTML and then convert that page into pdf

$htmlcode = 'http://localhost:8081/kaamtrade/resume.php?userid='.$userid;
$html2pdf->WriteHTML(file_get_contents($htmlcode));

i use this code in mpdf to convert whole resume html page into pdf. maybe help in your case.