简单的虚拟打印机驱动 [英] Simple virtual printer driver

查看:429
本文介绍了简单的虚拟打印机驱动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我要为Windows 7 64位写一个虚拟打印机驱动程序,我是驱动程序开发的初学者。



此驱动程序将从软(word,记事本,...)接收的所有数据发送到套接字(TCP服务器稍后将处理数据),仅此而已,无渲染,没有用户界面。



但是我没有找到很棒的文档或样本,只是解释了编写打印机驱动程序所需的内容。 WinDDK(tty,oemui)的样本太复杂了,我不明白源代码的一半。



你能帮帮我吗?



谢谢



PS:对不起我的英语水平:)





@JackDingler:

感谢您的回答,我没有说明我是学生,所以我不能付钱给某人:)

这个驱动程序是我的工作实习主题。



我设法简化了源代码,我现在明白了更好



@ Code-o-mat:

这就是我正在做的,我尝试重写WinDDK的tty(仅限通用文本)样本。

现在我知道,打印驱动程序必须通过学习样本来学习,因为没有关于它的文档或教程。

Thx





编辑:

实际上我发现可以使用Windows UniDrv.dll编写打印机驱动程序。

你认为它吗?可以简单地抓住他在任何渲染之前输出流,并简单地将其传输到服务器?

解决方案

你必须通过它来理解它。



你正在做的事情很复杂而且很难。



此外,你需要做一些握手。应用程序需要知道您的打印服务器支持哪些功能。您很快就会想要向用户报告状态。



简单的唯一方法就是付别人去做。但请记住,有编写打印机驱动程序经验的人很贵。


或者,您可以尝试找一些免费的,开源的,LGPL-ed,...打印机驱动程序,其中包含您需要的功能,并从打印命令创建某种文件,不知道什么格式,如后脚本文件或某些,你可以重写它,以便它将生成的文件写入套接字而不是文件。

看看一些非常聪明的人在这里做了什么 http://www.printerplusplus.com/ [ ^ ]

这可能会对您有所帮助学习特别是因为他们提供了源代码。



不要忘记在这里分享你所建立的东西 - 我们都站在我们面前的巨人和辛勤工作者的肩膀上。

Hello

I've to write a virtual printer driver for windows 7 64bits, and i'm a beginner in driver development.

This driver will send all the data received from the soft (word, notepad,...), into a socket (a TCP server will process data later), nothing more, no rendering, no user interface.

But i didn't found great docs or samples, which simply explains what is needed to write a printer driver. Samples of WinDDK (tty, oemui) are too much complex, and i don't understand half of source code.

Could you help me?

Thanks

PS : sorry for my English level :)


@JackDingler :
thanks for answer, i didn't specify that i'm a student, so i can't pay someone :)
This driver is my work placement's topic.

I managed to simplify to source code, i understand better now

@Code-o-mat :
That's what i'm doing, i try to rewrite the tty (generic text only) sample of WinDDK.
Now i know, print driver must be learned by studying samples, because there is no docs or tutorials about it.
Thx


EDIT :
In fact I found that it was possible to write printer drivers with the Windows UniDrv.dll.
Do you think that it is possible to simply catch the output stream before any rendering, and simply transfer it to a server?

解决方案

You'll have to work through it, to understand it.

What you're doing is complicated and hard.

Further, you will need to do some handshaking. Applications need to know what capabilities your print server supports. You'll soon want to report status back to the users.

The only way to make it simple is to pay someone else to do it. But keep in mind that people with experience in writing printer drivers are expensive.


Alternatively, you could try finding some free, open source, LGPL-ed, ... printer driver which has the features you require and creates some kind of file from the print commands, not sure what format, like a post-script file or somesuch and you could rewrite it so it will write the generated file to a socket instead of a file.


Have a look at what some very clever people have done here http://www.printerplusplus.com/[^]
this might be helpful to your learning especially as they provide source code.

Dont forget to share back here what you build - we all stand on the shoulders of giants and hard workers who go before us.


这篇关于简单的虚拟打印机驱动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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