Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
ccpplinux opened this issue Jun 5, 2023 · 2 comments
Open
1 task done

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

ccpplinux opened this issue Jun 5, 2023 · 2 comments

Comments

@ccpplinux
Copy link

ccpplinux commented Jun 5, 2023

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

@finwe finwe closed this as completed Jun 5, 2023
@ccpplinux
Copy link
Author

ccpplinux commented Jun 5, 2023

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();
?>

@KunalGautam
Copy link

Reference to #1277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants