I have installed the library wkhtmltopdf link in my CentOS VPS, when I run it from my server using terminal like : "wkhtmltopdf https://www.google.com google.pdf" I get some messages in the output as following :
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
and the PDF is created.
Now when I use PHP with exec command like :
<?php
$output = shell_exec("/usr/local/bin/wkhtmltopdf https://www.google.com google.pdf");
var_dump($output);
?>
the PDF file is created and all seems ok but I get NULL as value of the $output variable. Why is the exec command not giving the same out put?
Thanks
shell_execandexec? In which caseexecdoes not return the output, it allows you to collect it in an array which you give it as the 2nd perameter...? - SteJ