?
Solved

HOWTO: Pring job success?"

Posted on 2000-04-06
8
Medium Priority
?
648 Views
Last Modified: 2013-12-03
How can I tell if a print job was successfuly printed?

(No speculations please, I need something known to work with all printers).

The spooler API failed me so far, but maybe I'm missing something.
0
Comment
Question by:shaig
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 15

Expert Comment

by:NickRepin
ID: 2691856
GetJob(..Jobid...)
If Status==JOB_STATUS_PRINTED then the job is printed.

If Status==JOB_STATUS_DELETING or if
GetJob() returns an error value (job not found), then the job is either successfully printed and then automatically deleted, or deleted by the operator on any stage, there is no way to determine whether the job was successfully printed or not.
0
 
LVL 3

Author Comment

by:shaig
ID: 2693021
I never get the JOB_STATUS_PRINTED.
Besides, after the job is deleted the structure containing the job info looks somewhat curropt.
Any ideas?

0
 
LVL 15

Accepted Solution

by:
NickRepin earned 600 total points
ID: 2693188
The time when job is in JOB_STATUS_PRINTED state may be (usually) no more than several tenths of second. Because it is deleted immediately when it is printed.

Job structure is invalid once the job is deleted.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 15

Expert Comment

by:NickRepin
ID: 2693200
When you set 'Keep job after it has been printed' flag for a printer, you'll see all your jobs inJOB_STATUS_PRINTED state.
0
 
LVL 3

Author Comment

by:shaig
ID: 2693407
Can this flag be set programatically?
0
 
LVL 15

Expert Comment

by:NickRepin
ID: 2695016
GetPrinter(hPrinter,2,..)

PRINTER_INFO_2.Attributes |=PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS;

SetPrinter(hPrinter,2,..)

0
 
LVL 3

Author Comment

by:shaig
ID: 2697332
Thanks you.
0
 

Expert Comment

by:Begginer
ID: 25068199
Hi Shaig,
 Can u pls tell me how did u get the job id and how did u checked the print status..if have batch script for this pls  post that...
pls i am in need  of  this

Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question