WPF list available printers and trays

前端 未结 2 1271
囚心锁ツ
囚心锁ツ 2021-01-07 02:00

I\'m writing WPF application which needs to display list of available Printers and corresponding trays.

I can able to get list of available printers by loop through

相关标签:
2条回答
  • 2021-01-07 02:13

    You are looking for PaperSources property - Gets the paper source trays that are available on the printer. (MSDN: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printersettings%28v=vs.110%29.aspx)

    0 讨论(0)
  • 2021-01-07 02:39
        using System.Printing
        ......
    
        var printers = new LocalPrintServer().GetPrintQueues().Select(v => v.Name);
    
    0 讨论(0)
提交回复
热议问题