[英]Launch printer from the app
I am working on a UWP project and I am trying to print an image from my app. 我正在进行UWP项目,并且正在尝试从我的应用程序中打印图像。 I have tried using the printing sample from microsoft but it's utterly confusing and it's stuck on an error I don't have the time or the patience to solve.
我曾尝试使用Microsoft的打印样本,但是这完全令人困惑,并且卡在一个错误中,我没有时间或耐心来解决。 Is there a way to launch printer programmatically as if I right clicked the item and chose print?
是否可以通过编程方式启动打印机,就像我右键单击该项目并选择“打印”一样?
Diederik Krols did a very detailed blog post about printing, it's for WinRT but should mostly work for UWP too ( except for margins and layout because that has changed in Win10 UWP ) Diederik Krols撰写了一篇有关打印的非常详细的博客文章,该文章适用于WinRT,但也应该主要适用于UWP(除了页边距和布局,因为Win10 UWP中已更改)
So take a look at this sample http://blogs.u2u.be/diederik/post/2013/01/20/Printing-from-MVVM-XAML-Windows-8-Store-apps.aspx 因此,请看一下此示例http://blogs.u2u.be/diederik/post/2013/01/20/Printing-from-MVVM-XAML-Windows-8-Store-apps.aspx
It's still a lot of work though... 不过仍然有很多工作要做...
You shoud use RawPrinterHelper
class Please see the example in the following link 您应该使用
RawPrinterHelper
类。请参见以下链接中的示例
https://support.microsoft.com/en-us/kb/322091 https://support.microsoft.com/zh-CN/kb/322091
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.