2
votes

I'm using WKHtmlToPdf to generate some docs here at work, in internal applications, for over one and half year without any problem. Some applications are coded in C++, some in AutoIt3, and today, after restarting all the computers due to external reasons (power generator would be tested), wkhtmltopdf stopped working on all machines at my company.

I can't even run it from command line. Whether I try to convert a webpage or a local HTML file, it always hangs on 10%. All our machines are Windows 8 32 bits and runs their own install (the applications aren't running under a network share).

I tried downloading wkhtmltopdf again from the website, installing it, etc, but nothing worked. I also tried adding --disable-javascript option, which also didn't work. Cleaning %TEMP% folder did not help too.

I never faced anything like this. All the machines were restarted normally, going to start menu, etc. And it does not look like a network issue, since I'm accessing internet to write this, and we are a small company, we use a standard Wi-Fi router, just like your house. Nothing was changed, no file deleted, no Windows update, no network settings... just a restart. I saw some guys facing the same problem when trying to run wkhtmltopdf from PHP, but in this case, I have this problem even by running it from DOS, as anyone would do.

wkhtmltoimage is working fine. Just wkhtmltopdf stopped working.

Screenshot

1
Hi Jefrey - Sounds system related. You might have better luck migrating this question to serverfault.comdwarring
Hi @ArmanH, my issue is different. Actually, wkhtmltopdf does not work as expected.Jefrey Sobreira Santos
The core of that answer was that wkhtmltopdf may hang if the server running in single-thread mode. If you can't run it successfully from the command line, you are probably right that the issue is with either the install or configuration. My bad for the wrongful duplicate flag.Arman H

1 Answers

-1
votes

In my case, wkhtmltopdf was hanging on files locally stored after the progress counter had made an initial jump to the percentage corresponding to 1 page. It turned out that I had an http_proxy variable set to some unaccessible proxy server. Clearing this environment variable solved the issue.