Hi,
I write the following code to print the pdf file.
-----------------------------------------------------------
var printerSettings = new PrinterSettings();
process
= new Process();
process.StartInfo.FileName = FileToPrint;// pdf file to print
//print to specified printer
process.StartInfo.Verb
= "PrintTo";
process.StartInfo.CreateNoWindow = true;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
//Printer name
process.StartInfo.Arguments = printerSettings.PrinterName;
process.Start();
process.WaitForExit();
-------------------------------------------------------------------
It prints the file but it open the file first and then print it.
But I want the process should print it without opening any document.
any idea?
Thanks in advance.