• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

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.
1 Solution
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.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now