I have used wkhtmltopdf and barryvdh/laravel-snappy package in laravel version 10 for generate pdf reports and report is in Gujarati Shruti language.
Issue is report works fine in local system but when we upload it on server it’s not displayed.
We also find that if we use php artisan serve command then it got dependencies what’s required to load fonts and working fine.
At server we can’t use php artisan serve command and that causing the problem.
$getevidence = $this->reportRepository->downloadReport($request);
$pdf = PDF::loadView('pages.Report.downloadReportNew', compact('getevidence'))->setPaper('a4')->setOrientation('portrait');
$current = Carbon::now()->format('YmdHs').'pdf.pdf';
$pdf->save(public_path('Report-data/').$current);
It should work with Gujarati Language
Try adding your fonts Shruti in /public/fonts folder and add following css to it.