与System.Windows.Forms.WebBrowser控件打印 [英] Printing with the System.WIndows.Forms.WebBrowser control

查看:383
本文介绍了与System.Windows.Forms.WebBrowser控件打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是日WebBrowser控件在.NET 2.0框架。是否有可能改变打印行为,所以它始终打印到默认打印机,而不显示任何对话框给用户?这为售货亭所以总是会有直接连接到信息亭的打印机和打印应当是无缝给用户。

I'm using th WebBrowser control in the .net 2.0 framework. Is it possible to change the printing behavior so it always prints to the default printer, without showing any dialog to the user? This is for a kiosk so there will always be a printer directly connected to the Kiosk, and printing should be seemless to the user.

推荐答案

获取使用此处所示的方法默认的PrinterName http://msdn.microsoft.com/en- 我们/库/ system.drawing.printing.printersettings.isdefaultprinter.aspx

Get the default PrinterName using the method shown here http://msdn.microsoft.com/en-us/library/system.drawing.printing.printersettings.isdefaultprinter.aspx

,然后通过这个名字给的PrintDocument的PrinterSettings属性。

and then pass that name to the PrinterSettings property of the PrintDocument.

这篇关于与System.Windows.Forms.WebBrowser控件打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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