Specifies information about how a document is printed, including the printer that prints it, when printing from a Windows Forms application.
Assembly: System.Drawing (in System.Drawing.dll)
Typically, you access a through PrintDocument.PrinterSettings or PageSettings.PrinterSettings properties to modify printer settings. The most common printer setting is PrinterName, which specifies the printer to print to.
For more information about printing with Windows Forms, see the System.Drawing.Printing namespace overview. If you wish to print from a Windows Presentation Foundation application, see the System.Printing namespace.
The following code example prints a document on the specified printer. The example has three prerequisites:
A variable named filePath has been set to the path of the file to print.
A method named pd_PrintPage, which handles the PrintPage event, has been defined.
A variable named printer has been set to the printer's name.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.