2

When i download pdf using knpSnappy bundle , sometimes it's working proper and sometimes it's not working.

It generates errors like this:

The process "/usr/local/bin/wkhtmltopdf --margin-bottom '0' --margin-left '0' --margin-right '0' --margin-top '0' --page-size 'A4' --disable-javascript --load-error-handling 'ignore' '/tmp/knp_snappy59521f8e31bad9.75401982.html' '/tmp/knp_snappy59521f8e31c3d6.47962749.pdf'" exceeded the timeout of 60 seconds.

Please help me to resolve this issue.

Thanks

Krunal
  • 77,632
  • 48
  • 245
  • 261
Mansi
  • 21
  • 2
  • 8

1 Answers1

1

Try to set a different timeout after creating a snappy instance like so:

$snappy = new Pdf('/usr/local/bin/wkhtmltopdf.sh');

$snappy->setTimeout(600);  // 600 seconds
sergei
  • 803
  • 7
  • 12