A couple of questions and suggestions:
- Do you really need it converted to PDF? Why? In some cases, it would be better to stick with HTML.
- Is upgrading the hardware of the server that generates the PDF an option? I asked this because if all the libraries that you've tried is taking too long to create, then your only option might be upgrading the server.
- You might want to solve the problem with the command line error. If it gives the fastest results, then find a work around it.