I write a simple code for rendering chinese words in pdf. But the chinese words does not appear.
This is my code.
Route::get('/pdf', function () {
$html = '<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<p style="font-family: firefly, DejaVu Sans, sans-serif;">献给母亲的爱</p>
</body>
</html>';
$pdf = App::make('dompdf.wrapper');
$pdf->loadHTML($html);
return $pdf->stream();
});
I'm using
1) PHP 7.1.1
2) Laravel 5.3
I inserted the meta into the header and change the font. What might gone wrong here?please help thanks.