Send a printout directly to a specific printer in C#
This program uses the following code to print directly to the printer named "Dell Photo AIO Printer 926."
// Print.The code first sets the PrinterSettings object's PrinterName property to select the printer. It then calls the PrintDocument object's Print method to immediately send the printout to that printer.
private void btnPrint_Click(object sender, EventArgs e)
{
// Select the printer.
pdocSmiley.PrinterSettings.PrinterName = "Dell Photo AIO Printer 926";
// Print.
pdocSmiley.Print();
}



Comments