Skip to content

Instantly share code, notes, and snippets.

@akovalyov
Created August 4, 2015 21:51
Show Gist options
  • Save akovalyov/a0e833b1ffcadf48b3d3 to your computer and use it in GitHub Desktop.
Save akovalyov/a0e833b1ffcadf48b3d3 to your computer and use it in GitHub Desktop.
Snappy with multiple URLs
<?php
require_once 'vendor/autoload.php';
$pdf = new \Knp\Snappy\Pdf();
$pdf->setBinary('/home/andrew/.composer/vendor/bin/wkhtmltopdf-amd64');
file_put_contents('test.pdf', $pdf->getOutput(array('http://github.com', 'http://gist.github.com')));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment