DomPDF generation for chinese characters
问题 I am trying to generate a PDF that will contain Chinese characters using dompdf. Here is my code: require('dompdf/dompdf_config.inc.php'); $dompdf = new DOMPDF(); mb_internal_encoding('UTF-8'); def("DOMPDF_UNICODE_ENABLED", true); $html = ' <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <style> *{ font-family: DejaVu Sans, font-size: 12px;} </style> </head> <body> 忠烈祠 </body> </html>'; $dompdf->load_html($html); $dompdf->render(); $output = $dompdf->output(