UWP : Print with out Printer Popup Dialoag

依然范特西╮ 提交于 2019-12-24 00:55:50

问题


Am developing an application using UWP. I need to add PRINT feature.I have sample code to print. It is showing Print Popup dialoag.But Can any one suggest how to print with out that print popup. How to do it programmatically click Print button.


回答1:


In UWP app if you want to use a Windows Driver Printer than I am sorry the only option is to print using the Print Popup dialog.

If you want to print to a specific printer without print dialog then there are two ways-

  1. The printer should be OPOS based and you can use PosPrinter class to print to a specified printer(This uses OPOS drivers)
  2. If you want to use Windows driver printer then you need to use Windows brokered component and then use the classic .NET code to provide a wrapper to print to a specific printer, but you need to have your app through sideloading.

I hope this solves your problem.



来源:https://stackoverflow.com/questions/46644492/uwp-print-with-out-printer-popup-dialoag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!