Home  >  Article  >  Backend Development  >  html2fpdf中文转换

html2fpdf中文转换

WBOY
WBOYOriginal
2016-06-23 13:39:451929browse

我使用html2fpdf将html转为pdf输出   可是无法解决中文乱码问题   是我字体没有还是其他的什么问题    
网上说官方有一个中文支持文件 ,可是我下载不下来(论坛上提供的也下不了)    求帮忙  


回复讨论(解决方案)

html2fpdf我实在是搞不定了,换成了html2pdf
Vendor('html2pdf.html2pdf');
        $html2pdf = new HTML2PDF('P', 'A4', 'fr', true, 'UTF-8', array(30, 20, 25, 25));
        $html2pdf->parsingCss->fontSet('DejaVuSans');
        $html2pdf->WriteHTML("

出来吧悟空

this is a test");
        $html2pdf->Output("sample.pdf",'I');
        echo "PDF file is generated successfully!";
结果出来中文汉字全是??  
 请问各位大神,该怎么解决啊
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn