标签:exit 字体 fetch 导出 get 中文乱码 pre his new
public function get($html){ $content=$this->fetch($html); Vendor(‘mpdf.mpdf‘); //实例化mpdf $mpdf=new mPDF(‘UTF-8‘,‘A4‘,‘‘,‘宋体‘,20,20); //设置字体,解决中文乱码 $mpdf->useAdobeCJK = true; $mpdf->SetAutoFont(AUTOFONT_ALL); $mpdf->writeHTML($content); $mpdf->Output(iconv("utf-8","gb2312","aaa.pdf"),true); //$mpdf->Output(); exit; }
网上找的代码,拿来借鉴,发在博客里,以备查看
标签:exit 字体 fetch 导出 get 中文乱码 pre his new
原文地址:http://www.cnblogs.com/wyynts/p/6498201.html