- document
- A System.Drawing.Printing.PrintDocument that represents the document being previewed.
- e
- A System.Drawing.Printing.PrintEventArgs that contains data about how to preview the print document.
This method is called immediately after System.Drawing.Printing.PrintDocument raises the PrintDocument.EndPrint event. Even if an uncaught exception was thrown during the print preview process, PreviewPrintController.OnEndPrint(PrintDocument, PrintEventArgs) is called.
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.