I am trying to set up the nifty HTML to image plugin called wkhtmltopdf and I am having a really difficult time.
What I did so far:
Downloaded wkhtmltopdf zip package and upacked the file in my websites root folder
As a test I included the following code in my index.php file, which I would expect to save the contents of bbc.com website as a .jpg image in my websites root folder: ..
shell_exec('./wkhtmltopdf --quality 50 http://www.bbc.com bbc.jpg');
Nothing seems to happen. PHP is not running in safe mode, so that isn't the problem. shell_exec is executing, I was able to create a .txt document using it.
I have been researching this for days, I am offering 100 bounty to anyone that can come up with with a clear, simplified step-by-step working guide on how to set up wkhtmltopdf on Widows to run using PHP.
More specifically I am looking for simplified walk-through on how to:
Set up wkhtmltopdf to run on Windows using php (include details on common problems and how to overcome them).
On click of a button or link: print the 'current' web page to pdf, including all filled out input values (include sample code for this part). Webpages with events that change the content of the page, should print out the current version of the page, not the initial state of the page.
Create a download link of the .pdf created, onClick of the same function mentioned above that creates and prints to pdf (include sample code for this part).