I'm having trouble generating a PDF out of a html page.
I'm using PDFkit. I installed also wkhtmltopdf following the installation instructions. In 'usr/local/bin/' there is now a file called 'wkhtmltopdf'
When I run a pdf with PDFkit, it now gives an error:
command failed: "/usr/local/bin/wkhtmltopdf" "--margin-right" "0.75in" "--page-size" "Letter" "--margin-top" "0.75in" "--margin-bottom" "0.75in" "--encoding" "UTF-8" "--margin-left" "0.75in" "--quiet" "-" "-"
Also, when I try to generate a PDF directly it gives an error:
wkhtmltopdf --page-size A4--quiet http://localhost/invoices/22 -
'/usr/local/bin/wkhtmltopdf: cannot execute binary file'
Any idea of what this could be? This is how the PDFkit config file looks:
PDFKit.configure do |config|
config.wkhtmltopdf = '/usr/local/bin/wkhtmltopdf'
end
chmod
on it. – ScottJShea