This article mainly introduces PHP mpdf Chinese garbled How to solve, interested in the friend's reference, I hope to help you.
The solution of Ps:mpdf generating Chinese garbled characters
USEADOBECJK = true; $mpdf->setautofont (Autofont_all); $mpdf->setdisplaymode (' fullpage ');//$mpdf Watermark_font = ' GB ';//$mpdf->setwatermarktext (' Chinese watermark ', 0.1); $url = ' http://www.kuitao8.com/'; $strContent = File_ Get_contents ($url);//print_r ($strContent);d ie; $mpdf->showwatermarktext = true; $mpdf->setautofont ();//$ Mpdf->sethtmlheader (' head ');//$mpdf->sethtmlfooter (' bottom '); $mpdf->writehtml ($strContent); $mpdf->output (' ss.pdf ');//$mpdf->output (' tmp.pdf ', true);//$mpdf->output (' tmp.pdf ', ' d ');//$mpdf->output (); exit; >
Summary: The above is the entire content of this article, I hope to be able to help you learn.