Saturday, 15 September 2012

php - utf-8 support for barryvdh/laravel-dompdf on laravel 4 -



php - utf-8 support for barryvdh/laravel-dompdf on laravel 4 -

i using dompdf bundle here. able load view file pdf. text supposed in chinese did not display out. have tried adding font face still not solve issue. sample of view file

<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <style> @font-face { font-family: firefly; src: {{ storage_path().'/fonts/fireflysung.ttf' }}; } </style> </head> <body> <h3>summary invoice report</h3> date {{ $from }} {{ $to }} <p>date: {{ date('y-m-d') }}</p> <table border="1"> <thead> <tr> <th>invoice</th> <th>date</th> <th>company name</th> <th>total amt</th> <th>outstanding</th> <th>cancel amt</th> </tr> </thead> <tbody> @foreach ($data $row) <tr> <td> {{ $row->invoice_number }} </td> <td>{{ $row->created_at }} </td> <td>{{ $row->customer_name }} </td> <td>{{ $row->total_amount }} </td> <td>{{ $row->total_outstanding_amount }} </td> <td>{{ $row->cancel_amount }} </td> </tr> @endforeach <tr> <td colspan="3">total</td> <td>{{ $total_invoice }}</td> <td>{{ $total_outstanding }}</td> <td>{{ $total_cancel }}</td> </tr> </tbody> </table> </body> </html>

php laravel-4 dompdf

No comments:

Post a Comment