Open galtechstaffs opened 1 year ago
@galtechstaffs I am facing the same issue with the Chinese version. Is there anyone have a solution to it? @barryvdh
try to add this to the part
body { font-family: DejaVu Sans, serif; }
This can only work if you have a font file in your storage and then include it in your PDF blade file. I got a solution for it.
everything is clear in the image.
DejaVu fonts are already installed. I don't know, if it has Arabic. Or you can include any font via font-face.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any issues with PDF rendering itself that are not directly related to this package, should be reported on https://github.com/dompdf/dompdf instead. When having doubts, please try to reproduce the issue with just dompdf. If you believe this is an actual issue with the latest version of laravel-dompdf, please reply to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.
I am facing the same issue with arabic language. i will be thankful if any one has a solution.
Anything for ar !
For those who still facing a problem with rendering arabic charachters.
turning the auto_language_detection
option in the config file pdf.php
to true
fixed my problem.
'auto_language_detection' => true,
For those who still facing a problem with rendering arabic charachters. turning the
auto_language_detection
option in the config filepdf.php
totrue
fixed my problem.'auto_language_detection' => true,
Where exactly is this pdf.php file?
For those who still facing a problem with rendering arabic charachters. turning the
auto_language_detection
option in the config filepdf.php
totrue
fixed my problem.'auto_language_detection' => true,
Where exactly is this pdf.php file?
You can find it in the config folder.
For those who still facing a problem with rendering arabic charachters. turning the
auto_language_detection
option in the config filepdf.php
totrue
fixed my problem.'auto_language_detection' => true,
Where exactly is this pdf.php file?
You can find it in the config folder.
Hello @oualidoukassou ! I'm not sure which pdf.php file or config folder you're referring to. Are we using the same version? I'm using the latest version of laravel-dompdf (v2.2.0) I've found this solution to be working with short texts, but it breaks when passing longer texts to it. Expected output:
Actual output: Has anyone found any solution to this yet?
For those who still facing a problem with rendering arabic charachters. turning the
auto_language_detection
option in the config filepdf.php
totrue
fixed my problem.'auto_language_detection' => true,
Where exactly is this pdf.php file?
You can find it in the config folder.
Hello @oualidoukassou ! I'm not sure which pdf.php file or config folder you're referring to. Are we using the same version? I'm using the latest version of laravel-dompdf (v2.2.0) I've found this solution to be working with short texts, but it breaks when passing longer texts to it. Expected output:
يتم اختيار فريقنا بدقة بناءً على معايير تأهيل صارمة ويتعرض لرقابة جودة مستمرة من خلال لجنتنا. Actual output: Has anyone found any solution to this yet?
Sorry for the typo, by mentioning pdf.php
i was referring to the configuration file published by another package: mccarlosen/laravel-mpdf
Which i found more suitable to arabic. I think it's what you're looking for.
Hello @adnane-ka ! Thank you for your quick response! How was the transition from dompdf to mPDF? Was it smooth?
I get the PDF, but the Arabic character are like "??????" question mark icon composer.js "barryvdh/laravel-dompdf": "^2.0",
app.js 'providers' => [ Barryvdh\DomPDF\ServiceProvider::class, ], 'aliases' => [ 'PDF' => Barryvdh\DomPDF\Facade::class, ]
controller $pdf = PDF::loadView('admin.invoice.invoicepdf', ['invoices' => $invoices,]); return $pdf->stream();