I have some code that sends a text file to a printer as follows:
File.Copy(outputFile, "\\" & printServer & "\" & printer)
Is there a way I can specify the priority of the print job before it's sent to the printer?
I have some code that sends a text file to a printer as follows:
File.Copy(outputFile, "\\" & printServer & "\" & printer)
Is there a way I can specify the priority of the print job before it's sent to the printer?
No, there isn't. If there was, that would open the OS to a security vulnerability, in which other documents that are spooled to be printed could be denied printing by constantly putting new documents in with a higher priority.
Yeah, as opposed to users constantly adjusting their own priority up after printing documents.
We have the same problem: a department of students printing to a slow plotter, where some are smart enough to adjust their own job priority to 99 to "jump the queue" and get their jobs printed first, and thus meet their assignment deadlines.
How is it an "OS security vulnerability" to disable this feature, or set a default print priority, to solve the above problem?
As an aside, there's a script posted here that shows you how to change the priority of jobs already in the queue (though the need for polling to run this script frequently enough to be useful gives me shivers). Also, some guys over at CodeProject have the printer shadow file format outlined (search for "SpoolShadowFile" - I can't post more than one link) - presumably someone could write something that monitors this directory for files and automatically adjusting the priority when files appear... and perhaps figure out how to signal the spooler as well to update the details :)