Is there a way to programatically lock a network print device before printing a large batch of documents and release it after? We predominantly use C#, VS2010, .NET 4.0 Framework.
Our company has a lot of established processes that involve a great deal of printing. Many of these involve programatically printing a particular small document repeatedly, with different parameters each time. The result is a large batch of a few hundred pages that need to be in order.
Unfortunately, since the batch is sent to the printer as a series of small jobs rather than a single large job, should another user print to the same printer in the meantime, their job is liable end up between pages of the large batch, thereby messing up the order of the large batch, causing a search for a needle in a haystack, and frustrating the heck out of the user who printed the large batch.
Apparently this birthed a culture in our company, in which every time a user is about to print, they send out a mass e-mail to the entire company saying "I'm printing to such and such printer, I'll be using it for about an hour, please don't print to it, I will e-mail again when I am done."
I'd like to be able to programatically lock a printer, submit the batch of ordered print jobs, and then release the printer. Ideally, jobs could still be submitted to the printer but they would have to wait in queue until after the large batch finishes and the printer is released. Unfortunately, we haven't had much success pursuing that goal in the past. Has anyone else solved a similar situation using .NET?