- 安装 dompdf
composer require dompdf/dompdf
- 使用
$header = "<style>* {font-family: \"simsun\"}</style>";
$html = $header.$result["content"];
$pdfManager = new Dompdf();
$pdfManager->loadHtml($html);
$pdfManager->render();
$pdfManager->stream();
composer require dompdf/dompdf
$header = "<style>* {font-family: \"simsun\"}</style>";
$html = $header.$result["content"];
$pdfManager = new Dompdf();
$pdfManager->loadHtml($html);
$pdfManager->render();
$pdfManager->stream();
本文标题:使用第三方包 dompdf 将网页生成pdf 文件
本文链接:https://www.haomeiwen.com/subject/uhcnthtx.html
网友评论