lundi 20 mai 2019

PDF generation using laravel snappy

RuntimeException (127) The exit status code '127' says something went wrong: stderr: "sh: 1: /usr/local/bin/wkhtmltopdf: not found " stdout: "" command: /usr/local/bin/wkhtmltopdf --lowquality '/tmp/knp_snappy5ce38d027c1861.72296261.html' '/tmp/knp_snappy5ce38d027c2726.46251159.pdf'.

I am trying to print a HTML to PDF file for hardcopy and file purposes of my project in Laravel. I tried to use the barryvdh/laravel-snappy so I followed the documentations carefully and I also installed this wkhtmltopdf for ubuntu 16.04 64x bit cause I think it is required in order to use this package. But there is a big problem. When I generate a PDF sample using Snappy it gives me this error.

Using the below command in terminal I am able to generate pdf. wkhtmltopdf https://www.google.com google.pdf



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire