- document
- A System.Drawing.Printing.PrintDocument that represents the document being previewed.
- e
- A System.Drawing.Printing.PrintPageEventArgs that contains data about how to preview a page in the print document.
PreviewPrintController.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, this method is not 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.