There are a number of reasons for generation to fail.
Some of them are described here.
a) plugin based websites
if your website uses plugins such as flash, silverlight, java, etc., that content may not be repoduceable, and it may break the generation altogether
although the plugin supports basic form authentication, most authentication mechanisms are not supported by this tool, so it is designed for public facing sites mainly
as stated in the shipped documentation, you need to assign the correct permission settings in order for the generation to succeed
c.1) execute access for “bin-lin” for linux servers, “bin-win” for window servers, etc.
c.2) write access for “generated-bin” for linux server, “generated-win” for windows servers, etc.
d) shared hosting settings
if you use a shared hosting plan (you have ftp access but no remote access, so your server is shared with other people), it is possible that running external executable files (which is what this plugin does) is not allowed, or at least not allowed “by default”
my recommendation is to look for the following line in one of the plugin’s .php files:
#echo '<br />I am running command: ' . $command;
and uncomment it by removing the ”#”.
when you generate a pdf again, you will see what the $command is and you can send the full command line to your hosting company so they can run it and see the output
in my experience, one of two things will happen:
d.1) they will realize that this is a security breach and they will say it can’t be done
d.2) they will identify that there is something blocking on their side and they will fix it. some companies decide to install ‘wkhtmltopdf’ globally so that you, and other users can use it without having to use a local binary, so you could for example, update the command call to suppress the path to wkhtmltopdf, as it would be in the PATH variable
some servers may have different distributions of linux, and it may be advantageous for them (or yourself) to download and try later/specific versions of the executable, that can be found here: http://wkhtmltopdf.org/, and then placed under “bin-lin”