I need to print a file using sumatraPdf, but at the always shows up the window to specify the file name and directory of the output. How can i do it automatically in C#.? Any ideas?
var printerName = "Microsoft Print to PDF";
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "SumatraPDF.exe";
proc.StartInfo.Arguments = "-print-to " + '"' + printerName + '"' + " C:\\ttt.pdf";
proc.StartInfo.RedirectStandardError = false;
proc.StartInfo.RedirectStandardOutput = false;
proc.StartInfo.UseShellExecute = true;
proc.Start();
proc.WaitForExit();