Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Scenario: Users connected on a network using network printers all users are allowed printing rights.

Problem: Want to control not who can print rather what they print. Whenever a user from client machine presses ctrl+p or print in any application i would like to pause windows printing procedure from there generate my dialog box send a request to superior staff that 'A' user requested to print document named 'B' with 'C' details if superior staff allows then let windows continue normal printing procedure

1. Is there any event or method in c sharp or generally that tells us user has pressed ctrl+P or print button in any application.

2. if this approach is not good how should i control printing.
Posted
Updated 22-Dec-13 3:44am
v2
Comments
[no name] 22-Dec-13 20:36pm    
Employ a supervisor to save on paper - not bad.

1 solution

I see a truck load of problem with doing this, not the least of which is what happens when the supervisor isn't sitting in front of their computer to give the approval??

There is no event that says "something is trying to print." About the best you're going to do is connect all the printers to a central print server and control the queue from there. Maybe pausing the queue will let jobs in, but not print. You can see when new jobs show up with a WMI "create" event, but that's not exactly real time.

You cannot pause a job during printing because the printer will have a partial job sent to it, waiting for the rest. What if the supervisor cancels the job??

Also, not every job is going to have a nice name to look at and you're not going to get a nice picture to show your supervisor he can see the print job.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900