mpdf icon indicating copy to clipboard operation
mpdf copied to clipboard

Unable to write द्वितीय in PDF

Open ccpplinux opened this issue 1 year ago • 2 comments

Guidelines

Description of the bug

I am unable to write the hindi word द्वितीय in the PDF file generated by mpdf. When I am trying to display द्वितीय then it is being displayed as दिवतीय in the PDF file. So can any one help me to fix this issue so that I can correctly display the hindi word द्वितीय in the PDF file.

mPDF version

8.1.0

PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)

7.4

Reproducible PHP+CSS+HTML snippet suffering by the error

Below

ccpplinux avatar Jun 05 '23 10:06 ccpplinux

Here is the minimal code:

require_once __DIR__ . '/mpdf/vendor/autoload.php';

$mpdf = new \Mpdf\Mpdf();
$mpdf->autoScriptToLang = true;
$mpdf->baseScript = 1;
$mpdf->autoVietnamese = true;
$mpdf->autoArabic = true;
$mpdf->autoLangToFont = true;

$html=
"
<html>
    <head>
        <style>
            body { font-family: sans; text-align: justify; }
            p { font-family: sans; }
            div { font-family: sans; }
            h1 { font-family: sans; }
            td { font-family: sans; }
        </style>
    </head>
    <body>
        Result is द्वितीय
    </body>
</html>
";
$mpdf->WriteHTML($html);
$mpdf->Output();
?>

ccpplinux avatar Jun 05 '23 17:06 ccpplinux

Reference to #1277

KunalGautam avatar Jul 10 '23 02:07 KunalGautam