Principales respuestas

HOW TO: Check printer spool

Pregunta

I want to create a program that could check if the selected printer has a spool, what I mean it can check if the selected printer is currently printing or not. It can check also the status, documents and other printer details. Anybody here can help me pls

Thanks...

martes, 19 de agosto de 2008 2:16

Respuestas

Based on your post, my understanding of your question is that you need to monitor the printing queue and manipulate the printing jobs. In this scenario you can use Windows API to monitor a print queue and use WMI to control print jobs. I recommend that you read two articles about this kind of problem.

Todas las respuestas

Based on your post, my understanding of your question is that you need to monitor the printing queue and manipulate the printing jobs. In this scenario you can use Windows API to monitor a print queue and use WMI to control print jobs. I recommend that you read two articles about this kind of problem.

The snippet you provided will work perfectly in a scenario that I am setting up, the only problem is that it is only looking at the default printer's queue. I cant seem to figure out how to make it loop through all the printer queues and get the jobs from all printers installed on the machine. How could this code be modified to look at all printer queues on a system?

I found your code very helpfull and thanks for sharing, I just need some more assistance if you could help me, from this code I could gues your are expert in print programming and have good knowledge of it, any ways God bless your, next my first question
is that, I would like to get the number of copies of a job, in the que and limit the users if they print more than selected copies the the queue should pause it. not the number of pages in a job, the number of copies, and the second thing is , this code works
on the local machine, how if a print is sent from the network, is there any way that I can pause that print wich is coming from the network or another machine, on the network, most of my printers are connected through ip, and some are shared printers.