When we open an internet explorer(IE6 or IE7) and select File->Print
a print dialog is obtained, how can we catch these, and how can we catch the data that is going to printer, If there are 5 printers installed then how can we know the Printer name which is selected for printing(not the default printer's name),
how can get the BeginPrint, EndPrint, PrintPage Events fired?
How can I make catch Printing Events?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Jason15 reputationPosted Jul 16, 2009, 4:52 AM EDT
MSDN has a good example of this.
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.print.aspx
PrintDocument printDoc = new PrintDocument()
printDoc.BeginPrint += new PrintEventHandler(some_method);
printDoc.PrintPage += new PrintPageEventHandler(some_otherMethod);
printDoc.EndPrint += new PrintEventHandler(some_thirdMethod);
public void some_method(object sender, PrintEventArgs e)
{
//do some work
}
public void some_otherMethod(object sender, PrintPageEventArgs e)
{
//to print work
}