Open qqw1943 opened 2 years ago
hello. i am a new c# learner. when i try to print a pdf file using the example below:
using (GhostscriptProcessor processor = new GhostscriptProcessor()) { List<string> switches = new List<string>(); switches.Add("-empty"); switches.Add("-dPrinted"); switches.Add("-dBATCH"); switches.Add("-dNOPAUSE"); switches.Add("-dNOSAFER"); switches.Add("-dNumCopies=1"); switches.Add("-sDEVICE=mswinpr2"); switches.Add("-sOutputFile=%printer%" + printerName); switches.Add("-f"); switches.Add(inputFile); processor.StartProcessing(switches.ToArray(), null); }
there's always a dialog (see pic in attach files). but i need a Silently Print,which means no dialog is needed can i get some help here ? thank you.
same problem here
same problem here,can you give me some advice
Hi ist late, but maybe it still helps.
The Pirntername has spaces!
Try to use switches.Add("-sOutputFile=\"%printer%" + printerName + "\"" );
switches.Add("-sOutputFile=\"%printer%" + printerName + "\"" );
hello. i am a new c# learner. when i try to print a pdf file using the example below:
there's always a dialog (see pic in attach files). but i need a Silently Print,which means no dialog is needed can i get some help here ? thank you.![QQ截图20220411180751](https://user-images.githubusercontent.com/95621332/162716389-a4c52d40-eb1c-45b0-bc69-1f2259768e9f.png)