UWP:不使用打印机弹出对话框进行打印 [英] UWP : Print with out Printer Popup Dialoag

查看:200
本文介绍了UWP:不使用打印机弹出对话框进行打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Am使用UWP开发应用程序.我需要添加PRINT功能.我有要打印的示例代码.它显示了Print Popup对话框,但是任何人都可以建议如何在没有该弹出菜单的情况下进行打印.如何以编程方式单击打印"按钮.

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.

推荐答案

在UWP应用程序中,如果要使用Windows驱动程序打印机,很抱歉,唯一的选择是使用打印弹出"对话框进行打印.

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. 打印机应基于OPOS,并且可以使用 PosPrinter 类以打印到指定的打印机(使用OPOS驱动程序)
  2. 如果要使用Windows驱动程序打印机,则需要使用
  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.

这篇关于UWP:不使用打印机弹出对话框进行打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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