Solved

HOWTO: Pring job success?"

Posted on 2000-04-06
8
645 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 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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 shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…

737 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