当前位置:Gxlcms > PHP教程 > phpexcel生成pdf如何用arialunicid0-chinese-simplified.php文件设置中文?

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

时间:2021-07-01 10:21:17 帮助过:19人阅读

$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 里找到了,里面还有很多方法可以看着用

人气教程排行