C#windows服务创建打印 [英] C# windows service creation to print

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

问题描述

嗨朋友,



我需要紧急创建c#windows服务的要求。在那个发送打印机名称和文本。该服务将文本打印到我发送打印机名称的特定打印机。可能吗?请帮我这样做。



提前致谢

Athi varathan。



什么我试过了:



我想为Windows服务创建exe来打印选项。

Hi Friends,

I need urgent requirement for creating c# windows services . In that send printer name and and text . that services will print the text to particular printer which i send the printer name . Is it possible? Please help me to do this.

Thanks in advance
Athi varathan.

What I have tried:

I want to create exe for windows services to print options.

推荐答案

我认为这是可能的。



正如你所说,你想发送文本,我想你想把原始数据发送到打印机。 />
这篇文章介绍了如何: https://support.microsoft.com/en- us / kb / 322091 [ ^ ]



如果不是这样,你可以使用 PrintDocument Class(System.Drawing.Printing) [ ^ ],但是你需要在事件PrintPage中渲染图形。



决定你想怎么做并编写一个应用程序您可以用来调试代码。



下一步是学习如何编写Windows服务。在MSDN上,您可以找到以下文章:演练:在中创建Windows服务应用程序组件设计器 [ ^ ]



之后,这是将两者结合起来的问题。



注意:这对您来说非常紧迫,不适合我们。
I would think it is possible.

As you say that you want to send text, I assume you want to send raw data to the printer.
This is an article that describes how: https://support.microsoft.com/en-us/kb/322091[^]

If that is not the case you can use the PrintDocument Class (System.Drawing.Printing)[^], but then you need to render graphics in the event PrintPage.

Decide how you want to do it and write an app that you can use to debug your code.

Next step is to learn how to write a Windows Service. On MSDN you can find this article: Walkthrough: Creating a Windows Service Application in the Component Designer[^]

After that it is a matter of combining the two.

Note: It is only urgent for you, not for us.


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

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