Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does anyone know of any setting or third party software which forces print jobs to be printed in the order they are submitted?

share|improve this question
1  
They aren't printed in order? Is it possible you have some clients printing straight to the printer and some to the print spool? –  mfarver Nov 19 '10 at 16:17
1  
That's the default functionality. –  Stemen Nov 19 '10 at 16:19
2  
Isn't that why it's a queue? –  Bart Silverstrim Nov 19 '10 at 16:33
    
:) Try it. Get 8 PDFs, right click each one and go to print quickly in succession. See what order they print in. –  Christopher Edwards Nov 19 '10 at 19:30
    
I have tried it on three different network printers –  Christopher Edwards Nov 19 '10 at 19:31
show 1 more comment

1 Answer

I stumbled across this problem. In my use case, I had a script that iterated over all files in a directory and invoked the "Print" verb on them using ShellExecute. (So simulating the user going through each one, right clicking, and then choosing "print.")

The results are fine when you're only working with small numbers of documents, but with 10's or 100's there are always a few that are out of order.

It's hard to tell if the problem is with the program that's handling the "print" verb, or with the queue itself. (In my case, each time I'm invoking print I'm probably invoking a new instance of the program used for printing. This means that vagaries of execution time/scheduling could mean that the "print" program for document #2 actually submits job to the queue before document #1.)

It seems like there might be something going on with the queue too though.

I created a program that prints documents while watching the queue. The first version worked in the following way:

  1. ShellExecuteEx to print document
  2. Wait for document to show up in printqueue
  3. Print next document

In this version, a few documents would still print out of order. Second version was the one that worked:

  1. ShellExecuteEx to print document
  2. Wait for document to show up in printqueue
  3. Wait for spooling to complete (PrintSystemJobInfo.IsSpooling == false status in .NET)
  4. Print next document

This second version prints the documents in order every time. This leads me to believe that when you're submitting a bunch of documents, there's a weird period where it's a race to see which one get's spooled first.

I'm not familiar with the ins and outs of the Windows print system though. It could be that a job shows up before the program that generates it is done sending all data. This would mean variable execution time of the program behind the "print" verb could be causing the issue.

share|improve this answer
    
Well, I'm not crazy then! –  Christopher Edwards Mar 28 '12 at 19:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.