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