How to silent print pdf in c#

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
i want to print whitout opening adobe window.
i have this code: string printerName = "Microsoft XPS Document Writer";

Process process = new Process();
process.StartInfo.CreateNoWindow = true; //!! DOESNT WORK

process.StartInfo.UseShellExecute = false;
process.StartInfo.Verb = "PrintTo";

process.StartInfo.Arguments = """ + printerName + """;
process.Start();
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;

sleep(10*1000);
process.Kill();

View the full article
 

Similar threads

T
Replies
0
Views
86
thereisnopatchforhumancruelty
T
C
Replies
0
Views
78
Close AdobeReader after printing file
C
Back
Top