I am using Laravel Snappy as a wrapper for WKHTMLToPDF, to allow my app to generate PDFs. Unfortunately, I am receiving this error:
The exit status code '126' says something went wrong:
stderr: "sh: /audit/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64:
cannot execute binary file
"
stdout: ""
command: /audit/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality
I installed both 64 bit packages (PDF and Image) through Composer, following these instructions: https://github.com/KnpLabs/snappy#wkhtmltopdf-binary-as-composer-dependencies, and I can see the packages have installed within the /vendor/ folder of my app.
If I cd into the PDF directory and run sh ./wkhtmltopdf-amd64, it returns: cannot execute binary file.
Previously, I have run these two commands on the folder to try and stop this error: chmod a+x wkhtmltopdf-amd64 and sudo chmod +x wkhtmltopdf-amd64 - but neither appear to have resolved this issue of executing a binary file.
I am on the latest version of OS X, any help or guidance as to how I can get this working would be hugely appreciated.