3

I'm having problems with wkhtmltopdf under Windows. safe_mode is off and the folder's permission are ok. Here is an example:

exec('wkhtmltopdf.exe --margin-left 0mm --margin-right 0mm --margin-top 0mm --margin-bottom 0mm --page-size A4 --zoom 2.1 text.html test.pdf');

The first time the PDF gets generated, but to make it work again I have to restart apache.

2
  • tip: PHP will convert / to \ for you, so you don't need to double-backslash paths in php. c:/wamp/www/local/.... is perfectly acceptable and PHP will take care of the details for you. Save yourself from your bad case of "leaning toothpick syndrome"
    – Marc B
    Jan 8, 2013 at 20:36
  • I don't think PHP converts forward slashes to backslashes. Windows actually accepts both natively.
    – fabspro
    Jul 5, 2014 at 2:15

1 Answer 1

0

see if wkhtmltopdf is still running using your task manager after you complete first run. if it is running close it and try generating PDF

Post you apache error log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.