I am trying to create a PDF that has right to left
text blocks. I am using barryvdh/laravel-dompdf. Im my template I have
body {
font-family: Alef;
direction:rtl;
text-align:right;
}
I have also tried to add unicode-bidi :embed;
and unicode-bidi :bidi-override;
, the output however is not rtl
but is still ltr
.
My code is very straight forward:
$fontsLocation = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix()."fonts/";
$pdf = PDF::setOptions(['fontDir'=>$fontsLocation,'defaultFont'=>'Alef-Regular');
$pdf->loadView('pdf/quota', $data);
return $pdf->download($data["client"]."-".$data["id"].'.pdf');
Any advice will help. Thank you.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire