avatar

Andres Jaimes

How to choose a printer using C#

By Andres Jaimes

You can assign a printer and other settings by using the basic PrintDocument and PrintDialog controls properties. Look at the next example:

if (printDialog.ShowDialog() == DialogResult.OK) {
    printDocument.PrinterSettings.PrinterName = printDialog.PrinterSettings.PrinterName;
    printDocument.PrinterSettings.Copies = printDialog.PrinterSettings.Copies;
}