When overridden in a derived class, begins 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.
A System.Drawing.Graphics that represents a page from a System.Drawing.Printing.PrintDocument.
PrintController.OnStartPage(PrintDocument, PrintPageEventArgs) is called immediately before the System.Drawing.Printing.PrintDocument raises the PrintDocument.PrintPage event.
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. The PrintController.OnEndPage(PrintDocument, PrintPageEventArgs) method clears the System.Drawing.Graphics, while the PrintController.OnEndPrint(PrintDocument, PrintEventArgs) method deallocates the object.
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.