Search code examples
c#-4.0printingprintdocument

Print multiple jobs without interruption c#


Is there a way to print multiple jobs in a row, without letting another user send a print job in between? (sort of "don't give the token to another user as long as my print jobs haven't finished")

It's a shared printer and many users have access to it, and what I'm printig is a big document so it takes some time; I'm using more then one job because its pages are not to be printed from the same paper tray, so I have to switch the paper source in my code.

Help please! and thanks in advance.

P.S. I'm using the PrintDocument object of .Net


Solution

  • There isn't, as far are I know, you'd need to either keep the printer busy by keeping the job open and sending PJL or other commands that don't eject a page. The other option is to concatenate your jobs together into one large job. I guess you could also programatically pause the shared print queue and send the data directly using a direct IP print port or something. In the end there isn't an elegant solution to this.