Indian currency symbol not show when convert html2

2019-10-04 15:33发布

问题:

In my HTML report i used Indian new currency(₹) symbol. When I convert HTML report to PDF using html2pdf extension, all currency symbol change to question mark symbol. How can I prevent this from happening?

In HTML:

After convert to pdf: In PDF:

回答1:

<?php
include("../mpdf.php");
$mpdf=new mPDF('');
$mpdf->WriteHTML('<div style="font-family:dejavusanscondensed">&#x20b9;</div>');
$mpdf->Output();
exit;
?>

for reference use the link below

How to print Indian Rupee(₹) symbol in pdf using html?



标签: php html pdf yii