首页 >后端开发 >php教程 >phpexcel生成pdf如何用arialunicid0-chinese-simplified.php文件设置中文?

phpexcel生成pdf如何用arialunicid0-chinese-simplified.php文件设置中文?

WBOY
WBOY原创
2016-06-20 12:42:061466浏览

$filename=strval(date("Y-m-d h_i_sa",time()));header('Content-Type: application/pdf');header('Content-Disposition: attachment;filename="'.$filename.'.pdf"');header('Cache-Control: max-age=0');$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF');$objWriter->save('php://output');


如题...


回复讨论(解决方案)

$objWriter->setFont('arialunicid0-chinese-simplified');
自己从PHPExcel/Writer/PDF.php 里找到了,里面还有很多方法可以看着用

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn