1
$html="தனியுரிமை கொள்கை"; $html.= '   <html>   <head>

             $pdf->SetDisplayMode('fullpage');

$stylesheet = file_get_contents('css/invoice_custom.css'); //$html =
mb_convert_encoding($html, 'UTF-8', 'UTF-8');
$pdf->WriteHTML($stylesheet,1); $pdf->WriteHTML($html); 
//$pdf->Output('Invoice.pdf','I'); 
$filename="Invoice".rand().".pdf";



$pdf->Output();

The code is not displaying tamil characters, how can I fix that?

Mansa
  • 11
  • 1
  • I can't personally help with the mpdf/Tamil characters question, but in general you'll get better response on StackOverflow if your code is formatted as a code block (indent by 4 spaces). As it is it's difficult to read so people will skip it. – Rick Riensche Jan 24 '18 at 17:20
  • Check out this link https://mpdf.github.io/fonts-languages/fonts-in-mpdf-5-x.html. It might be related to fonts. – Soumya Jan 24 '18 at 17:36
  • I have tried the solution as per the above link. Now tamil font is not displayed correctly and english letters are not displayed. Can i show both tamil and english characters in pdf using mpdf? – Mansa Jan 25 '18 at 05:41
  • See example file with multiple languages https://github.com/mpdf/mpdf-examples/blob/development/example29_multilingual_autofont.php#L262 – Finwe Jan 26 '18 at 07:54
  • 3
    Does this answer your question? [mpdf not supporting arabic and chinese fonts](https://stackoverflow.com/questions/22221517/mpdf-not-supporting-arabic-and-chinese-fonts) – Adam Strauss Dec 06 '19 at 07:35

0 Answers0