0

I Generate Tamil Article in PDF using DOMPDF in Laravel.

In my View I defined Charset as Following :

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

but generate as PDF following :

enter image description here

Controller Code :

$memberDatas=Members::find($id);

$pdf = \PDF::loadView('pdf/pension', compact('memberDatas'));

return $pdf->download('NALA00-'.$memberDatas->id.'.pdf');

My Dompdf Version is 0.8.0

"barryvdh/laravel-dompdf": "^0.8.0",
Karthik
  • 5,589
  • 18
  • 46
  • 78
  • please show your `$memberDatas` and the pdf view. In my project, I am using `` too and working well – brobrobrobrobro Jun 14 '17 at 04:55
  • @brobrobrobrobro pdf view code : https://codeshare.io/2BMKbL $memberDatas code is already showed in question details. – Karthik Jun 14 '17 at 04:59
  • Unless you're in a very strict environment like shared hosting to deploy your code, using dompdf is not a good idea. You should be using wkhtmltopdf instead. – Rajender Joshi Jun 14 '17 at 05:39

2 Answers2

0

Are you using Tamil? UTF-8 not supppot Tamil. I haven't tested yet, but you can try use charset=x-iscii-ta or any charset that support your character.

brobrobrobrobro
  • 315
  • 4
  • 18
0

Finally, I tried another package and it's Working.

You can check Package and Git repo.

Composer command

composer require barryvdh/laravel-snappy

Thanks for all of you..

Bhavik Shah
  • 2,300
  • 1
  • 17
  • 32
Karthik
  • 5,589
  • 18
  • 46
  • 78