>当在wkhtmltopdf中将html转换为pdf时。我的 html 在 pdf 中的横向视图 (wkhtmltopdf( 上效果很好,但我想 a4 大小的 pdf。在 a4 大小中无法正常工作表格和其他字段。
$options = array(
'page-size' => 'A4',
'no-outline', // option without argument
'encoding' => 'UTF-8', // option with argument
'user-style-sheet' => $cssPath,
'margin-top' => 0,
'margin-right' => 0,
'margin-bottom' => 0,
'margin-left' => 0,
);
传递此选项,它将创建一个 A4 PDF