3
votes

Is it possible to extract RAW/Plain Text or any useful data from a Print Job using the Windows Printer Spooler API?

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.).

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.

I'm looking up the Win32 APIs, printMon and before inpout32 (for port listening).

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!

1

1 Answers

2
votes

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). You can reduce the problem to the monitoring for files with respect of ReadDirectoryChangesW or FindNextChangeNotification / FindFirstChangeNotification API.