c#获取打印机列表
2021-03-27 23:28
标签:for .com www als ted string htm server static 第一步:添加引用 第二步:代码 转载自:https://www.cnblogs.com/edielei/p/4966366.html c#获取打印机列表 标签:for .com www als ted string htm server static 原文地址:https://www.cnblogs.com/ITzhangyunpeng/p/9342948.html
using System.Printing;
public static List
{
List
LocalPrintServer printServer = new LocalPrintServer();
PrintQueueCollection printQueuesOnLocalServer = printServer.GetPrintQueues(new[] { EnumeratedPrintQueueTypes.Local });
foreach (PrintQueue printer in printQueuesOnLocalServer)
lt.Add(printer.Name);
return lt;
}