wkhtmltopdf sounds like an excellent solution...the problem is nothing happens on the exec
shell_exec("c:\wkhtmltopdf.exe","http://www.google.com google.pdf");
Am i doing anything wrong?
Can you use the "official" class?
http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp
If not, perhaps peeking into how they did things will help you out with your implementation.
// Include WKPDF class.
require_once('wkhtmltopdf/wkhtmltopdf.php');
// Create PDF object.
$pdf = new WKPDF();
// Set PDF's HTML
$pdf->set_html('Hello <b>Mars<.b>!');
// Convert HTML to PDF
$pdf->render();
// Output PDF. The file name is suggested to the browser.
$pdf->output(WKPDF::$PDF_EMBEDDED, 'sample.pdf');
Edit:
New link, from the Githubs - https://github.com/mikehaertl/phpwkhtmltopdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With