This class encapsulates the data for the
PrintDocument.PrintPage event.
You should handle this event and paint the page's
imagery on the supplied Graphics surface. To
determine how the page should be printed, you can use the
MarginBounds, PageBounds, and
PageSettings.
If the document contains more pages that need printing, you should
set the HasMorePages property to true, but if not,
set it to false and the print job will be completed.
To abandon the print job, you can set the Cancel
property.
public class PrintPageEventArgs : EventArgs {
// Public Constructors
public PrintPageEventArgs(System.Drawing.Graphics graphics, System.Drawing.Rectangle marginBounds,
System.Drawing.Rectangle pageBounds, PageSettings pageSettings);
// Public Instance Properties
public bool Cancel{set; get; }
public Graphics Graphics{get; }
public bool HasMorePages{set; get; }
public Rectangle MarginBounds{get; }
public Rectangle PageBounds{get; }
public PageSettings PageSettings{get; }
}