how to integrate knpsnappybundle for taking snapshot in CRON base?
KnpSnappyBundle is a Symfony Bundle and based on the Symfony HTTP component wich is not compatible with PSR-7 HTTP interface.
My dashboard is filled with google map svg because of that i could not convert as pdf so i decide to convert image using wkhtmltoimage is not working kindly give me the solution for this.
The KnpLabs/snappy is a wrapper for wkhtmltopdf. You could try to use KnpLabs/snappy directly.
use Knp\Snappy\Pdf; // Make a snapshot from a URL $snappy = new Pdf('/usr/local/bin/wkhtmltopdf'); $content = $snappy->getOutput('http://www.github.com'); // save to file // ...
I trid same but i get error like this:
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
This error message sounds like an server (setup) specific issue… e.g. permissions, wkhtmltopdf etc.
Check your server error logfiles to see more.
You may also create create an issue here:
Try to run:
/usr/local/bin/wkhtmltopdf http://www.google.com google.pdf
There is also other package: https://github.com/mikehaertl/phpwkhtmltopdf