Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
When running wkhtmltopdf 0.12.1 (with patched qt) like this
on a document containing
(a non-existent image), one gets the following output
and a status code of 0 (success), a PDF is generated.
If, however the URL of the image gets slightly changed to something like
(only added a random query param) one gets the following output
and a status code of 1 (error). A PDF is generated nonetheless, but wrapper code will assume a non-recoverable error.
This is clearly very confusing behaviour and imho. a bug.
I was too getting same error. On further investigation I came to conclusion that inclusion of base tag in head section was cause of problem. I was writing a code like this:
referenced this issue
Jun 30, 2015
I had similar problem: generating PDF from within PHP was working fine, but a direct execution of wkhtmltopdf command in a console was throwing
The thing is - I was using url with user token, that later was used inside the code to authenticate on the server:
And I found out that on some OS that address was not interpreted right and the token was malformed by the time in got to my js-script.
Maybe it will help someone.
I also got this error today. In my case it was because I'd made a change to my nginx config that blocked access to the website in question for the server that wxhtmltopdf was running on. Basically, wkhtmltopdf got a "401 Forbidden" when trying to open the URL, and that resulted in this error.