views:

22

answers:

0

I'm planning to write a program that calculates the costs of users' print jobs and, for expensive jobs, prompts them if they want to continue printing anyway. (I know that there are existing utilities like GreenPrint that do something similar; my approach is a bit different.)

I am curious if there is a straightforward way to intercept XPS spool files after they're created but before they get printed, ideally in such a place that I can delay the job, present a dialog box, and cancel the job if the user clicks "no".

I understand that Windows has the AsyncUI system for printer-to-user notification (http://www.microsoft.com/whdc/device/print/AsyncUI.mspx), which sounds like it would solve the notification problem, but I'm not sure where in the print path (http://msdn.microsoft.com/en-us/library/aa506189.aspx) I can intercept the jobs themselves.

The new XPSDrv system supports "filter pipelines", in which multiple successive transformations can be run on the spool files, but those are created for each individual driver. I would like to write a driver-agnostic program. I am curious if there is a way to create a filter through which all jobs must pass.

Thanks in advance for any pointers!