C# 获取打印机列表

第一步:添加引用
using System.Printing;

第二步:代码
public static List<string> GetPrintList()
{
    List<string> lt = new List<string>();
    LocalPrintServer printServer = new LocalPrintServer();
    PrintQueueCollection printQueuesOnLocalServer = printServer.GetPrintQueues(new[] { EnumeratedPrintQueueTypes.Local });
    foreach (PrintQueue printer in printQueuesOnLocalServer)
        lt.Add(printer.Name);
    return lt;
}html