Question
How to Print a PDF programmatically without the Adobe Reader Window
Hi,
I'm trying to print a PDF my application. I would prefer to do it as silent as possible - no PrintDialogue | Adobe Reader Window.
- Language C#
- Adobe Reader 10.0
Here´s some Code:
| public static void PrintPDF(string file, string printerName) | |
| { | |
| Process proc = new Process(); | |
| proc.StartInfo.FileName = @"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"; | |
| proc.StartInfo.Arguments = @" /t /h " + "\"" + file + "\"" + " " + "\"" + printerName + "\""; | |
| proc.StartInfo.UseShellExecute = true; | |
| proc.StartInfo.CreateNoWindow = true; | |
| proc.Start(); | |
| Thread.Sleep(1000); | |
| proc.WaitForInputIdle(); | |
proc.Kill(); | |
| } |
It works, but the Adobe Reader Window is still popping up -> /h (start the reader minimized) does not work.
Is there another way to hide the Window ?
Regards
