Ghostscript.NET
Ghostscript.NET copied to clipboard
Silently Print
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 + "\"" );