Ask HTML to PDF Chinese is a question mark solution
Html2fpdf Simple HTML to PDF Chinese garbled I can't handle it, I changed it to Html2pdf.
Vendor (' html2pdf.html2pdf ');
$html 2pdf = new Html2pdf (' P ', ' A4 ', ' fr ', true, ' UTF-8 ', Array (30, 20, 25, 25));
$html 2pdf->parsingcss->fontset (' Dejavusans ');
$html 2pdf->writehtml ("
Come out, Big Brother.
This is a test ");
$html 2pdf->output ("Sample.pdf", ' I ');
echo "PDF file is generated successfully!";
The results come out Chinese characters are all question marks
You big God, how to solve AH really no need to ask God to help you I really have no way
------to solve the idea----------------------
This is because you do not dejavusans this font, but also a bit of a problem with the wording
You can refer to the sample file he provided examples/utf8.php
and will style= "Font-family:freeserif" >
Change to style= "Font-family:stsongstdlight"
As for how to use other fonts, the online introduction of many