<PackageReference Include="System.Drawing.Common" Version="9.0.5" />

PrintPageEventArgs

public class PrintPageEventArgs : EventArgs
Provides data for the PrintPage event.
public bool Cancel { get; set; }

Gets or sets a value indicating whether the print job should be canceled.

public Graphics Graphics { get; }

Gets the Graphics used to paint the page.

public bool HasMorePages { get; set; }

Gets or sets a value indicating whether an additional page should be printed.

public Rectangle MarginBounds { get; }

Gets the rectangular area that represents the portion of the page inside the margins.

public Rectangle PageBounds { get; }

Gets the rectangular area that represents the total area of the page.

public PageSettings PageSettings { get; }

Gets the page settings for the current page.

public PrintPageEventArgs(Graphics graphics, Rectangle marginBounds, Rectangle pageBounds, PageSettings pageSettings)

Initializes a new instance of the PrintPageEventArgs class.