- document
- A System.Drawing.Printing.PrintDocument that represents the document being previewed.
- e
- A System.Drawing.Printing.PrintEventArgs that contains data about how to print the document.
PreviewPrintController.OnStartPrint(PrintDocument, PrintEventArgs) is called immediately after System.Drawing.Printing.PrintDocument raises the PrintDocument.BeginPrint event.
PreviewPrintController.OnStartPrint(PrintDocument, PrintEventArgs) creates the System.Drawing.Graphics that is displayed during the print preview. After PreviewPrintController.OnStartPrint(PrintDocument, PrintEventArgs) is called, the PreviewPrintController.OnStartPage(PrintDocument, PrintPageEventArgs) method sets the System.Drawing.Graphics to a graphic of a single page. The PreviewPrintController.OnEndPage(PrintDocument, PrintPageEventArgs) method clears the System.Drawing.Graphics, while the PreviewPrintController.OnEndPrint(PrintDocument, PrintEventArgs) method deallocates the object.
PreviewPrintController.OnStartPrint(PrintDocument, PrintEventArgs) verifies that the printer settings are valid.