Solved

HOWTO: Pring job success?"

Posted on 2000-04-06
8
637 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
  • 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 150 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

943 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now