The problem was because I had used apt-get install to install wkhtmltopdf but doing this provides a very limited solution i.e. a number of options are omitted including adding more than one page. By downloading and installing manually everything worked.
PHP WkHtmlToPdf cant add multiple pages
-
05-07-2023 - |
문제
I am having problems adding multiple pages to a PDF document using the great PHP wkHTMLToPdf wrapper.
The following code just gives me a blank page
require_once('phpwkhtmltopdf/WkHtmlToPdf.php');
$pdf = new WkHtmlToPdf;
$pdf->addPage('http://www.google.co.uk');
$pdf->addPage('http://www.google.co.uk');
$pdf->send('test.pdf');
exit();
but this works fine.
require_once('phpwkhtmltopdf/WkHtmlToPdf.php');
$pdf = new WkHtmlToPdf;
$pdf->addPage('http://www.google.co.uk');
$pdf->send('test.pdf');
exit();
해결책
제휴하지 않습니다 StackOverflow