I want to print a pdf file with selected printer name via Ghostscript.NET. This application is actually a wrapper of CefSharp browser. When user click on a download button, it download and print out with selected printer directly.
You can see the screenshot above, I pass the printer name thru URL query string. Also, I have set the option -dNOPAUSE
& -dNOPROMPT
. But why it still come out a print window, and the default selected printer is not what I have set?
Any idea what's going wrong here?
EDIT: Mar 4, 2016 11:31am
For ghostscript in command line, it will be like
"C:\Program Files (x86)\gs\gs9.18\bin\gswin32c.exe"^
-empty^
-dPrinted^
-dBATCH^
-dNOPAUSE^
-dNOPROMPT^
-sFONTPATH=C:\Windows\Fonts^
-dNOSAFER^
-dNumCopies=1^
-sDEVICE=mswinpr2^
-sOutputFile="%printer%Brother MFC-295CN Printer"^
-f C:\Users\Dell\AppData\Local\Temp\file-tmp.pdf
but then it still show the print prompt.