- document
- A System.Drawing.Printing.PrintDocument that represents the document currently being printed.
- e
- A System.Drawing.Printing.PrintPageEventArgs that contains the event data.
The System.Windows.Forms.PrintControllerWithStatusDialog class calls the System.Drawing.Printing.PrintController.OnEndPage(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintPageEventArgs) method on the encapsulated System.Drawing.Printing.PrintController.
The PrintControllerWithStatusDialog.OnEndPage(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintPageEventArgs) method is called immediately after the System.Drawing.Printing.PrintDocument raises the System.Drawing.Printing.PrintDocument.PrintPage event. If an exception is thrown inside a System.Drawing.Printing.PrintDocument.PrintPage event of a System.Drawing.Printing.PrintDocument, PrintControllerWithStatusDialog.OnEndPage(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintPageEventArgs) is not called.
The PrintControllerWithStatusDialog.OnStartPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs) method creates the System.Drawing.Graphics object that is sent to the printer. After PrintControllerWithStatusDialog.OnStartPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs) is called, the PrintControllerWithStatusDialog.OnStartPage(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintPageEventArgs) method sets the System.Drawing.Graphics object to a graphic of a single page. (Use PrintControllerWithStatusDialog.OnStartPage(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintPageEventArgs) to set how to print a page in a document. For example, you can adjust page settings separately for each page.) PrintControllerWithStatusDialog.OnEndPage(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintPageEventArgs) clears the System.Drawing.Graphics object, while the PrintControllerWithStatusDialog.OnEndPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs) method deallocates the object.