RSS

Daily Archives: September 8, 2009

Printing PDF documents in C#

using System.Diagnostics;

PrintDialog printDialog1 = new PrintDialog();
Process p = new Process();
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = @”C:\c.pdf”;
info.Verb = “Print”;
info.Arguments = printDialog1.PrinterSettings.PrinterName;
info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
p.StartInfo = info;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.CloseMainWindow();

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/8ce3dd94-ff2c-4c3c-ba85-f67b9dd2f2e8

Advertisements
 
Leave a comment

Posted by on September 8, 2009 in Window Application