从Windows打印服务 [英] Printing from a Windows Service

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

问题描述

如何打印从Windows的服务特定的打印机上打印文档,而无需任何用户互动的?

How can I printing a document on a specific printer from a Windows-Service without the need of any user-interaction?

一个字符串,或文本文件。也许Crystalreport?

A string, or a text-file. Maybe Crystalreport?

感谢。

推荐答案

关键不在于如何从Windows服务或从应用程序打印,如果你不希望任何用户交互做的是需要你有没有任何需要显示的打印对话框(你不能因为一个窗口服务没有指定所有打印参数。访问UI)

The point is not how to print from a windows service or from an application, if you don't want any user interaction to be required you have to specify all print parameters without any need to show a print dialog ( which you can't because a windows service has no access to the UI ).

在这里看到:的 http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx

这篇关于从Windows打印服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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