System.Drawing.Printing.PrintDocument Class

Defines a reusable object that sends output to a printer, when printing from a Windows Forms application.

See Also: PrintDocument Members


[System.ComponentModel.ToolboxItemFilter("System.Drawing.Printing", System.ComponentModel.ToolboxItemFilterType.Allow)]
public class PrintDocument : System.ComponentModel.Component


Typically, you create an instance of the System.Drawing.Printing.PrintDocument class, set properties such as the PrintDocument.DocumentNameand PrintDocument.PrinterSettings, and call the PrintDocument.Print method to start the printing process. Handle the PrintDocument.PrintPage event where you specify the output to print, by using the PrintPageEventArgs.GraphicsSystem.Drawing.Graphics property of the System.Drawing.Printing.PrintPageEventArgs.

For more information about printing from a Windows Form application, see the Windows Forms Print Support. If you wish to print from a Windows Presentation Foundation application, see the System.Printing namespace.


Namespace: System.Drawing.Printing
Assembly: System.Drawing (in System.Drawing.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,