2017-06-19 50 views
0

我不能DOMPDF使用泰語無法使用泰語中DOMPDF

https://github.com/barryvdh/laravel-dompdf

我在泰語使用

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
    <title></title> 
    <style> 
     @font-face { 
      font-family: 'THSarabunNew'; 
      font-style: normal; 
      font-weight: normal; 
      src: url("file://{{ asset('fonts/THSarabunNew.ttf') }}") format('truetype'); 
     } 
     body { 
      font-family: "THSarabunNew"; 
     } 
    </style> 
<body> 
    <table> 
     <tr> 
     <th>name</th> 
     <th>email</th> 
     </tr> 
     @foreach ($customer as $c) 
     <tr> 
      <td>สวัสดี {{$c->name}}</td> 
      <td>{{$c->email}}</td> 
     </tr> 
     @endforeach 

    </table> 
</body> 

結果 「สวัสดี」=> 「?????「。請幫幫我。

+0

我想我之前用過DomPDF的泰語。你嘗試過沒有設置任何字體家族,或刪除