Solved

HOWTO: Pring job success?"

Posted on 2000-04-06
8
634 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Author Comment

by:shaig
Comment Utility
Can this flag be set programatically?
0
 
LVL 15

Expert Comment

by:NickRepin
Comment Utility
GetPrinter(hPrinter,2,..)

PRINTER_INFO_2.Attributes |=PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS;

SetPrinter(hPrinter,2,..)

0
 
LVL 3

Author Comment

by:shaig
Comment Utility
Thanks you.
0
 

Expert Comment

by:Begginer
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

771 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