Created
December 8, 2010 10:14
-
-
Save aur1mas/733109 to your computer and use it in GitHub Desktop.
usage example https://github.com/aur1mas/Wkhtmltopdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
$wkhtmltopdf = new Wkhtmltopdf(array('path' => APPLICATION_PATH . '/../public/uploads/')); | |
$wkhtmltopdf->setTitle("Title"); | |
$wkhtmltopdf->setHtml("Content"); | |
$wkhtmltopdf->output(Wkhtmltopdf::MODE_DOWNLOAD, "file.pdf"); | |
} catch (Exception $e) { | |
echo $e->getMessage(); | |
} |
Hello,
Thank you for your reply.
I've added the line $wkhtmltopdf->Wkhtmltopdf::_render; at the end.
I've got this error: "The website encountered an error while retrieving http://localhost/test/. It may be down for maintenance or configured incorrectly".
So it's not working anymore.
How can I display the full exception?
Many thanks,
Romain
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My guess is that your wkhtomtopdf must have some problem.
Display the full exception, and not only the message, and also display the return of Wkhtmltopdf::_render, you'll have plenty of information to debug this =).