Search code examples
pdfpdf-generationdompdfwkhtmltopdf

wkhtmltopdf - cannot convert local file


I just downloaded version 10.0 for opensuse v. 11.3. I can convert a webpage (ie www.google.com) using it but cannot convert a local file. I grant all permissions on the file (& i've even tried running under sudo to no avail). This is the error:

"Loading pages (1/6) Error: Failed loading page file:///file.html".

The file exists but wkhtmltopdf refuses to load it. I even tried version 9.9 w/ the same result

What am I missing?


Solution

  • 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.