In my recent project I had a task to print PDFs directly from a workflow. Since we use Foxit Quick PDF library on other tasks, at first we decided to use this one. Printing worked fine with one exception, several times per day library crashed during the printing process and took with it web application with user sessions. We didn’t find any relation to the content, that was being printed and Foxit support wasn’t really helpful. Actually wasn’t helpful at all.
In the end we decided to switch to print through Ghostscript. There’s no need to develop an extra module for printing like it had been with Foxit, we could use
OperatingSystemService.StartProcess method. Only challenge was to find out the correct argument to pass to Ghostscript. We also needed to rewrite one workflow to store PDF content to file, since we couldn’t use Ghostscript to print directly out of memory.
After the deployment of new solution we didn’t experience any crash. And since Ghostscript runs in a different process, even if it would crash, it wouldn’t take whole application with it.