I have this problem using mPDF
with hebrew language.
These are mPDF and PHP versions I am using PHP: 5.6.25 mPDF: up to date
<?php
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new mPDF('utf-8');
$mpdf->SetDirectionality('rtl');
$mpdf->WriteHTML('<h1 lang="he">sssשדגשדגשדג</h1>');
$mpdf->Output();
as you can see, I have added utf8 charset and set direction to rtl.
when I exec the code I get only the sss
letters without the hebrew I think its ignore them.
THANKS~
Just put this in your code before $mpdf->WriteHTML();
$mpdf->autoScriptToLang = true;
$mpdf->autoLangToFont = true;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With