Reputation: 413
I am looking for a way to create PDF from (BLADE )HTML with CSS
I am using this.
"barryvdh/laravel-dompdf": "^0.8.7",
but its output looks misconversion.
$pdf = PDF::loadView('test'
)->setPaper('a4', 'portrait');
return $pdf->stream("aaa.pdf");
I use this html
https://github.com/okoppe8/PaperFormToHTML
result here.
Upvotes: 0
Views: 156
Reputation: 15319
Use Custom font to display.So download simhei.ttf
from any source.and place it public
folder.Then you can use below css
<style type="text/css">
@font-face {
font-family: SimHei;
src: url('simhei.ttf') format('truetype');
}
* {
font-family: SimHei;
}
</style>
As per github issue Ref:https://github.com/barryvdh/laravel-dompdf/issues/198
Download font from https://www.wfonts.com/font/simhei
Upvotes: 1