getting print job status RRS feed

  • Question

  • From our application, we want to print a "raw" data file to the printer, and verify that the job was actually printed.  Using the Win32 API (EnumJobs, GetPrinter, etc.), we are somewhat able to check on the status of the printjob; However, in certain circumstances (such as if the printer tray is open), the job is de-spooled and no longer in the print queue, and so the Win32 API gives us no status on that job.  It is not until the second or third job is sent (tray still open) that things get stopped up in the print queue, and we can get a status of the jobs still in the queue, but our app has no way to determine the success or failure of the initial job. 
    So the questions are:
      1. Is there a way to get the status of a print job (all the way to the output tray, not just that it de-spooled) using the Windows spooler?
      2. Is there a way to get the same status using something other than the Windows spooler?

    Monday, June 11, 2007 2:09 PM

All replies

  • Hi CodeShaper,


    I am also facing same issue.

    If you have got some solution on above mentioned problem, request you to please let me know.




    Friday, December 21, 2007 1:30 PM
  • hello Ajay

        we gave up on the Win32 API idea because we came across a MUCH better idea... now we send PJL commands directly to the printer and we can tell when each page is printed, and much more.  To get started, check out the following code project:




    hope this helps!



    Friday, December 21, 2007 3:14 PM
  • Thanks CodeShaper,


    This article really gave good direction to my issue.

    As I went through details I found these PJL commands are specifically for printers manufactured by HP.

    So I just wanted to confirm if you have verified these PJL commands or application across different printer vendors like Canon, Xerox, etc.


    Request you to please let me know if this works for across different Printer vendors to get total no. of pages printed.


    Thanks Again,




    Wednesday, December 26, 2007 10:42 AM