Solved

Printing result ?

Posted on 1997-10-14
3
263 Views
Last Modified: 2010-04-04
We would like to know, when we send a file to the printer, if the file was printed.

Is there a (Windows API/Delphi) function who can give the print-result back to our program ?

Jan.
0
Comment
Question by:JanDidden
  • 2
3 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1347489
I Think so no, because You can only get information if the job was sended to PrintManager. I don't know any way to get information from PrintManager about his jobs, but you can try with dde or other method.
0
 
LVL 3

Accepted Solution

by:
Pegasus100397 earned 50 total points
ID: 1347490
Jan,

Unfortunately I don't think there is a function to determine if the file has been printed. Your program would only be able to determine when the file was cleared from the print queue.

An alternative method (although kludgy IMHO) might be to monitor the status of the Printer queue dialog box (the one that comes up when you right-click on the printer icon in the status tray), scan the items contained in it (get the handle of the dialog and scan it's children for the list box containing the print jobs). Your program would, of course,  have to know the name of the report it just printed and "alert itself" when the report name ceased to exist in the print queue (job printed).

Anyways, hope this helps & good luck.
Pegasus
0
 
LVL 3

Expert Comment

by:Pegasus100397
ID: 1347491
Jan,

My previous "Answer" was not quite 100% true. Upon further research I found the Windows API functions for monitoring the status of a print job. Check out online-help for
WM_SPOOLERSTATUS,
JOB_INFO_2 (very good explaination there),
GetJob,
SetJob and EnumJobs

These are messages/API functions that will allow you to monitor the status of your print job. Let me know if these work for you or if you need help writing the functions to interface with the API.

Good luck
Pegasus
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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 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

21 Experts available now in Live!

Get 1:1 Help Now