I installed wkhtml from here http://code.google.com/p/wkhtmltopdf/downloads/list (specifically wkhtmltox-0.11.0_rc1-installer.exe for Windows). I called ir from the command line and it worked fine, but when I try to call it using the PHP exec or shell_exec function, it only works if wkhtmltopdf.exe is in the same directory as my php.
So, if I do this:
exec("wkhtmltopdf c:/wamp/www/test/pdf.html c:/wamp/www/test/pdf.pdf");
and the wkhtmltopdf file is located in the c: / wamp / www / test directory, it works fine, but if I do this:
exec("C:/Program Files/wkhtmltopdf/wkhtmltopdf.exe c:/wamp/www/test/pdf.html c:/wamp/www/test/pdf.pdf");
it doesn't work at all.
Can you help me? I would like to make it work, even if it is in a different directory.
Thanks.
source share