Reputation: 1297
I am using niklasravnsborg/laravel-pdf to create a PDF file in Laravel. I'd like to use the Arial font however the font is not working.
$pdf = PDF::loadView('blade', $data, [], [
'format' => 'A4-L',
'orientation' => 'L'
]);
Upvotes: 3
Views: 2314
Reputation: 116
I was stuck in same issue. Below is its exact solution
$pdf = PDF::loadView('blade',$data, [], [
format' => 'A4-L',
'orientation' => 'L',
'mode' => 'c'
]);
and in blade file you should need to add on top
<style type="text/css">
body {
font-family: Arial, Helvetica, sans-serif;
}
</style>
Upvotes: 6
Reputation:
You can use CSS to use a specific font.
body {
font-family: Arial, sans-serif;
}
Upvotes: 1