Solved

Printing result ?

Posted on 1997-10-14
3
257 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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