第一步:添加引用
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;
}
新闻热点
疑难解答