在Windows/Web应用程序中禁用打印通知对话框 [英] Disabling Printing Notification Dialog Boxes in Windows/Web Apps

查看:96
本文介绍了在Windows/Web应用程序中禁用打印通知对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用程序,其中我尝试从文件中打印记录.
尝试打印记录时,它会显示打印对话框.

我想压制它.

任何想法都会非常有帮助.

在此先感谢您.

I am creating a application in which i try to print records from a file.
While trying to print the records ,it shows the print dialog.

I want to suppress it.

Any ideas will be really helpful.

Thanks in advance.

推荐答案

使用您的文件路径直接.........

不要使用showdialog方法.

XpsDocument xpsDocument =新
XpsDocument("C:\\ FixedDocumentSequence.xps",FileAccess.ReadWrite);
FixedDocumentSequence fixedDocSeq = xpsDocument.GetFixedDocumentSequence();

pDialog.PrintDocument(fixedDocSeq.DocumentPaginator,测试打印作业");
use your file path direclty.........

dont use showdialog method.

XpsDocument xpsDocument = new
XpsDocument("C:\\FixedDocumentSequence.xps", FileAccess.ReadWrite);
FixedDocumentSequence fixedDocSeq = xpsDocument.GetFixedDocumentSequence();

pDialog.PrintDocument(fixedDocSeq.DocumentPaginator, "Test print job");


这篇关于在Windows/Web应用程序中禁用打印通知对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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