Get All Installed Printers in C#

This class is located in System.Drawing.Printing namespace.

so you need to add a reference System. Drawing and then importing it using a statement.

using System.Drawing.Printing;

To get all the printers available, you need to iterate the string values through PrinterSettings.

For example

Add a ListBox to your Windows application and then use the foreach statement for an iteration.

foreach (string printName in PrinterSettings.InstalledPrinters)
{
    listBox1.Items.Add(printName);
}

This will show you all the available Printers installed on your computer as seen below.

Printers

Because I've not installed any physical printers on my computer it shows the printer services.


Recommended Free Ebook
Similar Articles