Laravel DomPdf does not support UTF-8

I am trying to use dompdf in laravel 4.2, in this document for utf-8 support I have to be set

in the meta tag but doesn't work correctly. for example after a skip string like latin character like Hello World this package can create currect PDF but when I set Arabic or Persian character like سلام

. the generated pdf file is empty without any line. i think my code is correct and this package does not support correct utf8

My code:

$pdf = App::make( 'dompdf' );
$pdf->loadHTML( '<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>PDF</title></head><body><h1>سلام</h1></body></html>' );

return $pdf->stream();



source to share

1 answer

You can use TCPPDF It is available at the following link: laravel-tcpdf



All Articles