the task is to create a log of all .pdf print jobs a user has sent from a specific computer. Once the file gets printed, I want to open the file (programmatically) and extract some information from it.
I know that I can use the Print Spooler API to retrieve a list of all printers and then use GetJob() to find information about a new job. The JOB_INFO structure does not contain the full file path, however, which would be what I need to open the file, however. This makes sense since I can also send a print job directly from any program without having any actual file at all.
Is there a way of hooking into the default print dialog? Or maybe the "Print..." - button in the windows explorer? Not really sure where to start looking, I will be glad for any hint I can get.
Ideally in C#, but any language will be fine.