- 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. Initially, the PrintPageEventArgs.Graphics property of this parameter will be null. The value returned from this method will be used to set this property.
A System.Drawing.Graphics that represents a page from a System.Drawing.Printing.PrintDocument.
PreviewPrintController.OnStartPage(PrintDocument, PrintPageEventArgs) is called immediately before System.Drawing.Printing.PrintDocument raises the PrintDocument.PrintPage 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.
Anti-aliasing, also known as gray scaling, makes the print preview look better. However, the use of anti-aliasing can slow down the rendering speed. For more information about anti-aliasing, see the PreviewPrintController.UseAntiAlias property.