wkhtmltopdf - cannot convert local file
You need to provide the full path. Using file:///
does not make use of the current working directory. Rather, it specifies the path to the file from the root of the file system.
Try with this option :
wkhtmltopdf --enable-local-file-access
It works for me.
Just as a notice to any future people. I couldn't get the accepted answer working on Ubuntu 14.04, so I resorted to piping my HTML to the wkhtmltopdf
command like so:
cat test.html | wkhtmltopdf - test.pdf
This is from the wkhtmltopdf
command-line help:
Use - for stdin or stdout