I am in need of your support on the following issue since its pulling me for a while. We have a small c#
utility, which print given PDF
using Gho
Try the following command within Process.Start()
:
gswin32c.exe -sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -dNOPROMPT -dNoCancel -dPDFFitPage -sOutputFile="%printer%\\[printer_servername]\[printername]" "[filepath_to_pdf]"
It should look like this in C#:
string strCmdText = "gswin32c.exe -sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -dNOPROMPT -dNoCancel -dPDFFitPage -sOutputFile=\"%printer%\\\\[printer_servername]\\[printername]\" \"[filepath_to_pdf]\"";
System.Diagnostics.Process.Start("CMD.exe", strCmdText);
This will place the specified PDF file into the print queue.
Note- your gswin32c.exe must be in the same directory as your C# program. I haven't tested this code.