我有一个问题,当我下载PDF时,它会一起下载PDF中的字体,这将创建一个非常大的PDF (关于10mb+)。
<?php
include "/dompdf_config.inc.php";
$html =
'<html><body><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style>
*{ font-family: simsun; }
</style>
<p>开发人员指南</p>
</body></html>';
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("hello.pdf"); ?>发布于 2016-03-15 14:07:52
您将希望启用字体子设置。
在dompdf 0.6.2或更早版本中,将DOMPDF_ENABLE_FONTSUBSETTING配置常量设置为true。配置常数可以在dompdf/dompdf_config.custom.inc.php中设置。
在dompdf 0.7.0或更高版本中,在实例化dompdf之后,可以使用set_option方法:$dompdf->set_option('isFontSubsettingEnabled', true);配置此选项。
发布于 2021-06-23 20:04:22
遵循在laravel最新版本中使用无下巴语言支持的步骤

语言6.我附上图像,这样它就能帮助你

https://stackoverflow.com/questions/36011446
复制相似问题