是否有类似的东西:
$dompdf = new DOMPDF();
$dompdf->resolution(200);
$dompdf->load_html($html);
$dompdf->render();
不必在 dompdf_config.inc.php 中进行设置,因为我有多个 PDF 文件并且它们需要不同的 DPI。
最佳答案
如果您使用的是来自 github 的最新代码,那么您可以执行以下操作:
PHP
$dompdf = new DOMPDF;
$dompdf->set_option( 'dpi' , '200' );
$dompdf->load_html($html);
$dompdf->render();
完整选项列表可见in the source .
关于php - DOMPDF - 在个案基础上定义 DOMPDF_DPI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20415211/