RSS

Printing PDF documents in C#

08 Sep

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

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: