If you pass "-" instead of "output.pdf", you should get the output as a stream. Then you can capture this stream, but do not forget to check it in advance and associate with stderr and stdout, as well as debug both outputs, since wkhtmltopdf can be a bit stubborn :)
In C #, forwarding is pretty straightforward, while stdin / stderr / stdout is streams. You should test all three as wkhtml output for both: one for pdf output and one for the user interface output that you see when you start from the command line. Sorry for the lack of Java or a working example, I have not really tried this, since my processes are queued and they are written to disk.
Process _process = new Process(); // Other stuff here _process.StartInfo.RedirectStandardError = true; StreamReader sr = _process.StandardError;
source share