Reputation: 5418
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();
Upvotes: 3
Views: 1907
Reputation: 5418
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.
Upvotes: 1