Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I control the order of print jobs in the printspooler, or how can I determine when a job is finished to start the next job

Posted on 2003-12-11
3
Medium Priority
?
265 Views
Last Modified: 2010-04-05
WE are trying to print multiple word documents from Windows api through Delphi 5. The problem we have, is we do not know how to access the print job object that tells us when the current print job is finished so that we can close the worddoc object and instantiate the next doc for printing.  The reason we must wait, is because if we fill the print queue in the desired order, it does not necessarily print the documents in that same order.  Any suggestions would be greatly appreciated.

Thanks,
0
Comment
Question by:jreznikoff
[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
3 Comments
 
LVL 5

Accepted Solution

by:
delphized earned 2000 total points
ID: 9922376
if it's local and you want a simple solution, then use

procedure WM_SpoolerStatus(var Msg : TWMSPOOLERSTATUS);
      message WM_SPOOLERSTATUS;

...

procedure TFmMain.WM_SpoolerStatus(var Msg : TWMSPOOLERSTATUS);
begin
 memo1.lines.add('Nro '+inttostr(msg.JobsLeft));
  memo1.lines.add('Status '+inttostr(msg.JobStatus));
  msg.Result := 0;
end;

this gives you the number of jobs in the queue.

if you need more precision (enum the print jobs, tell me)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

715 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