Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
On occasion, you might need to pause a print job or set of print jobs and then resume printing those documents later. For example, if you have one document that needs to be printed immediately, you can pause all the other print jobs on a printer. As soon as that document begins to print, you can resume the paused print jobs.
Alternatively, you might have a very large document that takes a long time to print. In that case, you can pause the large document and wait until the print queue is empty before printing it.
In practice, you can pause only print jobs that are waiting in the queue. Although you can pause the document currently being printed, this usually has no practical benefit. Except for extremely large documents, the entire print job is sent to the printer buffer. Because the printer continues printing until the buffer is empty, the pause command might have no effect. If the entire print job is in the buffer, the entire print job will print. If you pause all the print jobs in the queue, those jobs will not print. However, any new documents sent to the printer will print as expected.
You can pause print jobs by using the Pause method of the IADsPrintJobOperations interface.
Note
Listing 13.14 contains a script that pauses all the print jobs in a print queue that are over 400,000 bytes in size. To carry out this task, the script must perform the following steps:
This variable will now contain a collection consisting of all the print jobs in the ArtDepartmentPrinter print queue.
Listing 13.14 Pausing Print Jobs
|
|
Send us your feedback | « Previous | Next » |