C# 获取打印机列表

        public 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;
        }
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页