Printing two or more documents together

I have say two documents that I want to print. I have a xps document and a rtf document. I want to print these two documents together i.e. when these two are printing any other print job should be waiting in the print queue and should not come in between.

I will be printing these two documents in a windows service. I will be submitting print job for these two documents one after the other. I want to make sure that no other job comes in between these two.

Thanks in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't think there is any way of doing so from the PC. It could be done on the printer, if it allows you to save print jobs on disk. In that case you can send your documents to it, then walk up to the printer and print them manually from the disk.
jackroAuthor Commented:
I am looking for something that can be done programatically.
I think that the only way you'd get close to what you want is something like the following:

(a) Print the first (XPS) document, but use the driver's 'print to file' option to send the print stream to a named file on the workstation.
Unfortunately, most drivers will ask for the name of the file for each print request; I don't know if this can be changed to always use a particular name (and hence not ask for the name each time).

(b) Print the second (RTF) document, and again use the driver's 'print to file' option to send the print stream to a second named file on the workstation.

(c) Concatentate the contents of the two original print files into one merged print file.

(d) 'Send' the contents of the concatenated print file direct to the printer port.
For (most) TCP/IP connected devices, you could use the 'lpr' command to do this.

But even with this mechanism, with the contents of the one file sent in a continous stream to the target printer, the stream will still consist of two jobs, so (especially if you have more than one active port (e.g. parallel and RJ45)on the printer) it might still theoretically be possible for another job to be interleaved.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Printers and Scanners

From novice to tech pro — start learning today.