← Back to Pdfgenerator Support
chris10207
from the default example, it throws the exception
local.ERROR: RuntimeException: The exit status code '127' says something went wrong:
stderr: "sh: /Users/christophevidal/Sites/oc-skillup/plugins/initbiz/pdfgenerator/vendor/bin/wkhtmltopdf-amd64: No such file or directory
"
stdout: ""
command: /Users/christophevidal/Sites/oc-skillup/plugins/initbiz/pdfgenerator/vendor/bin/wkhtmltopdf-amd64 --lowquality '/var/tmp/knp_snappy6793d475207ab2.88184497.html' '/Users/christophevidal/Sites/oc-skillup/storage/temp/my-pdf_yrmdMiYCbzWfcHj.pdf'. in /Users/christophevidal/Sites/oc-skillup/vendor/knplabs/knp-snappy/src/Knp/Snappy/AbstractGenerator.php:473
Stack trace:
more details:
#0 /Users/christophevidal/Sites/oc-skillup/vendor/knplabs/knp-snappy/src/Knp/Snappy/AbstractGenerator.php(198): Knp\Snappy\AbstractGenerator->checkProcessStatus(127, '', 'sh: /Users/chri...', '/Users/christop...')
#1 /Users/christophevidal/Sites/oc-skillup/vendor/knplabs/knp-snappy/src/Knp/Snappy/Pdf.php(36): Knp\Snappy\AbstractGenerator->generate(Array, '/Users/christop...', Array, false)
#2 /Users/christophevidal/Sites/oc-skillup/vendor/knplabs/knp-snappy/src/Knp/Snappy/AbstractGenerator.php(236): Knp\Snappy\Pdf->generate(Array, '/Users/christop...', Array, false)
#3 /Users/christophevidal/Sites/oc-skillup/plugins/initbiz/pdfgenerator/classes/PdfGenerator.php(130): Knp\Snappy\AbstractGenerator->generateFromHtml('<!doctype html>...', '/Users/christop...', Array)
inIT
Hi,
Thanks for using our plugin.
Yes, the error message says that there's no wkhtml binary.
According to the first paragraph in the documentation:
After installing you should be ready to go, but in a lot of cases, you will have to set an absolute path to the executable binary of wkhtmltopdf in backend settings.
Wkhtmltopdf is a normal executable file in your system. You may have it in the default directory but sometimes it's somewhere else, or installed somewhere totally outside the project. Open settings, save them, and see if that helps. But if not you'll have to find working binary that handles pdf generation and set it in the settings.
Thanks,
Tomasz Strojny
1-3 of 3