WPF列出可用的打印机和纸盘 [英] WPF list available printers and trays
问题描述
我正在编写WPF应用程序,该应用程序需要显示可用打印机和相应纸盘的列表.
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 the following line
打印机设置.InstalledPrinters
,现在坚持获取相应的打印机纸盘. 有人可以提供示例代码吗?
and now stuck up with getting corresponding printer trays. could anybody give sample code?
推荐答案
您正在寻找PaperSources
属性-Gets the paper source trays that are available on the printer
. (MSDN: http://msdn.microsoft.com/zh-CN/library/system.drawing.printing.printersettings%28v=vs.110%29.aspx )
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)
这篇关于WPF列出可用的打印机和纸盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!