Laravel DOMPDF UTF 8
Using DOMPDF, when generate pdf not English text showing ???????
How can I add UTF8 encoding ?
public function getPDF($id)
{
$invoice = Invoice::find($id);
$pdf = PDF::loadHTML('invoices.pdf', ['invoice' => $invoice] );
return $pdf->download('file.pdf');
}
in blade using
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
does your font support those non-english characters? try using DejaVu Sans and check if that works
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style>
* { font-family: DejaVu Sans !important; }
</style>
</head>
@www888 it must be your font that doesn't support a non-English character.
Please or to participate in this conversation.