Reputation: 59979
Through Google and Stackoverflow, i found out that it is possible to make a printer monitor that will watch for any printer jobs, and extract usefull information from them.
I am assuming the application will only sent a job name, and wont sent any file path with it or any information that will let me recreate this information, but it worth a shot to ask and see if someone know some more of this. (preferable in C#) So I was wondering about if it is somehow possible to get the file path of any print job?
Upvotes: 0
Views: 393
Reputation: 8706
As you have noted, unless the program itself sends the data along to the printer, you won't be able to get the path without considerable work.
The only semi-reliable way to get the path is to use hooking on the client end to get the data as it goes to the printer, and even then, it sometimes requires knowledge of how the program works to get the right information. The program may not expose any method to know what is the "current" document.
My company designed such a system and were successful in tracking that data for a predetermined set of programs. If the user printed from a program unknown to the system, we had a way of prompting the user outside of the program through notification tray popups and such.
Upvotes: 1