Solved

How do I pause, copy and then cancel a print job before it starts printing?

Posted on 2007-11-29
3
1,232 Views
Last Modified: 2012-06-27
I am using delphi7, I have written a simple app using Mad Collection components to hook the "CreateDCW", what happens is when a person clicks print, the hook causes a form to display asking the user if they want to print in draft mode. We already setup additional printer drivers for each printer with draft at the front.
Example: Normal Printer Name = "Lexmark 2400", Draft mode setup = "Draft Lexmark 2400".
Problems:
1) How do I get the current printer name  that is going to print, each time I try something I get the default printers name instead.
2) If the printer name = "Lexmark 2400" I want to change the printer and print the document to "Draft Lexmark 2400" instead if they click on the Yes option.
3) I then need to delete the print job from "Lexmark 2400" before it starts printing, so I assume I would need to pause it, get the jobs details and then delete it.

Like I said I have got the hook working and the form displays at the correct time but now I am stuck with the printer changes.
Some code for any of the above questions would be appreciated.
0
Comment
Question by:freelancedev
3 Comments
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 500 total points
ID: 20396776
since I am not sure about your need, whether it is in VB or in Delphi. I just provide the link for your need. Please check whether this helps
http://www.merrioncomputing.com/Programming/PrintStatus.htm
http://support.microsoft.com/kb/202480
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21216652
Forced accept.

Computer101
EE Admin
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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

830 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