When job is printed, last job status is JOB_STATUS_RETAINED, instead of JOB_STATUS_PRINTED

1.7k views Asked by At

I poll printer queue on any change like JOB_CHANGE, and if I see that some job disappeared, I report to server that job has been printed or deleted, according to job last status.

Problem is that printer Lexmark X945e returned last job status only JOB_STATUS_RETAINED, but no JOB_STATUS_DELETED or JOB_STATUS_PRINTED.

What does that mean? Can I use retained status to say that job was printed?

1

There are 1 answers

0
sashoalm On BEST ANSWER

In case you meant JOB_STATUS_RETAINED when you said RETAINED, I found this link in the documentation:

Windows Vista and later: Job has been retained in the print queue and cannot be deleted. This can be caused by the following: 1) The job was manually retained by a call to SetJob and the spooler is waiting for the job to be released. 2) The job has not finished printing and must finish printing before it can be automatically deleted. See SetJob for more information about print job commands.

From SetJob documentation:

JOB_CONTROL_RETAIN Windows Vista and later: Keep the job in the queue after it prints. JOB_CONTROL_RELEASE Windows Vista and later: Release the print job.

From the documentation, it seems that SetJob(JOB_CONTROL_RELEASE) could be used to release the job.