简体   繁体   English

Windows Printer Spooler API获取打印数据

[英]Windows Printer Spooler API get print data

Is it possible to extract RAW/Plain Text or any useful data from a Print Job using the Windows Printer Spooler API? 是否可以使用Windows Printer Spooler API从打印作业中提取RAW /纯文本或任何有用的数据?

I am trying to build a separate App on a windows machine that listens to a Print Job and extracts "usable" data from it (plain text, etc.). 我试图在Windows机器上构建一个单独的应用程序,它可以监听打印作业并从中提取“可用”数据(纯文本等)。

Say I print a "Hello Word" text from notepad, a separate application using the Win32 Spooler API would "catch" this job, get the plain text, then store it in a File/Database while the Printer prints it. 假设我从记事本打印“Hello Word”文本,使用Win32 Spooler API的单独应用程序将“捕获”此作业,获取纯文本,然后在打印机打印时将其存储在文件/数据库中。

I'm looking up the Win32 APIs, printMon and before inpout32 (for port listening). 我正在查找Win32 API,printMon和inpout32之前(用于端口监听)。

If someone can give me some guidance, help or what more to look into or even shed some light if this is possible it would be very helpful. 如果有人可以给我一些指导,帮助或者更多的内容,或者甚至可以提供一些亮点,如果可能的话,这将是非常有帮助的。

Thanks! 谢谢!

Probably the information from my old answer and another one could help you. 可能来自我的旧答案另一个的信息可以帮助你。 I developed print monitor some year ago so I could answer on your additional questions. 我在一年前开发了打印显示器,所以我可以回答你的其他问题。 Perhaps you can solve your problem like I describe in old answer without usage of WDK (DDK). 也许你可以解决你的问题,就像我在没有使用WDK(DDK)的旧答案中描述的那样。 You can reduce the problem to the monitoring for files with respect of ReadDirectoryChangesW or FindNextChangeNotification / FindFirstChangeNotification API. 您可以将问题减少到与ReadDirectoryChangesWFindNextChangeNotification / FindFirstChangeNotification API相关的文件监视。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM