在PHP中转换html2pdf时不显示印度货币符号

时间:2014-07-22 11:52:52

标签: php html pdf yii

在我的HTML报告中,我使用了印度新货币(₹)符号。当我使用html2pdf扩展名将HTML报告转换为PDF时,所有货币符号都会更改为问号符号。我怎样才能防止这种情况发生?

在HTML中: enter image description here

转换为pdf后: 在PDF中: enter image description here

1 个答案:

答案 0 :(得分:1)

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

供参考使用下面的链接

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