[UWP]在UWP App中禁止打印对话框 [英] [UWP]Suppress Print Dialog in UWP App

查看:93
本文介绍了[UWP]在UWP App中禁止打印对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我们正在努力开发一个UWP应用程序,用于打印访问者签入的徽章标签。我们使用Windows.Graphics.Printing.PrintManager在我们的应用程序中打印功能。一切都在预期,除非我们想要打印
时出现打印对话框,这不是预期的。由于此应用程序用于标签打印,因此许多用户希望打印其标签,并且此打印对话框正在中断用户体验。我们希望打印应该发生但没有这个打印对话框
我们只想提前知道打印机名称和打印文档大小。您能按照我们的要求分享我们如何实现这些功能吗?






谢谢,

Sandeep Prajapat

Hi,

We are working to develop a UWP app which is meant for print the badge labels checked in by the visitor. We are using the Windows.Graphics.Printing.PrintManager for printing features in our app. Everything is working expected except whenever we want to print a print dialog appears which is not expected one. Since this app is meant for label printing many users want to print their labels and this print dialog is interrupting the user experience. We want that printing should happen but without this print dialog and we just want to mention printer name and print document size before hand. Can you please share how we can achieve this features as per our requirements?



Thanks,
Sandeep Prajapat

推荐答案

不,目前有在UWP中没有可以停止打印对话框的内置API。一种可能的方法是你可以在你的UWP应用程序中调用win32应用程序。 win32应用程序可以打印而不显示打印对话框。为此,您可以使用  FullTrustProcessLauncher
Class
 和添加一项特殊功能:runFullTrust。 

No, currently there is no build-in API in UWP that could stop the Print Dialog. A possible way is that you could call a win32 app in your UWP app. The win32 app could print without showing the Print Dialog. To do that you could use FullTrustProcessLauncher Class and add a special capability: runFullTrust. 

祝你好运,

Roy


这篇关于[UWP]在UWP App中禁止打印对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆