Wkhtmltopdf
Wkhtmltopdf copied to clipboard
WKHTMLTOPDF didn't return any data
Hi there, i'm trying to use your classe, but when o use it i do have this error, it create me a html file with my content but say that it do not receive any data :/
here's my code: try { $wkhtmltopdf = new Wkhtmltopdf(array('path' => './public/uploads/')); $wkhtmltopdf->setTitle("Title"); $wkhtmltopdf->setHtml("
i also try with get_page_content, an url always same issue.
Thanks.
Hello,
The wkhtmltopdf class is hosted here: https://github.com/aur1mas/Wkhtmltopdf
On 01/27/2015 05:00 AM, sevenup30 wrote:
Hi there, i'm trying to use your classe, but when o use it i do have this error, it create me a html file with my content but say that it do not receive any data :/
here's my code: try { $wkhtmltopdf = new Wkhtmltopdf(array('path' => './public/uploads/')); $wkhtmltopdf->setTitle("Title"); $wkhtmltopdf->setHtml("
coucou "); $wkhtmltopdf->output(Wkhtmltopdf::MODE_DOWNLOAD, "file.pdf"); } catch (Exception $e) { echo $e->getMessage(); }
i also try with get_page_content, an url always same issue.
Thanks.
— Reply to this email directly or view it on GitHub https://github.com/aur1mas/Wkhtmltopdf/issues/24.
"protected $_bin = 'your binary wkhtmltopdf path';"
You must set above line in the class at first.
Check binary file permissions. Usually located here: vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/lib
I was able to generate pdf. But, some how it is ignoring the css. If I generate it using terminal then pdf is generated with css. But, somehow it CSS is getting ignored when I try to use the PHP class then PDF is generated with out css. Please guide me
I have installed the executable in the home folder, I have mentioned correct path to the executable, for example $_bin = '/home/dev/wkhtmltox/bin/wkhtmltopdf' but still i get the error "WKHTMLTOPDF didn't return any data"