Solved

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

Posted on 2007-11-29
3
1,238 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
[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 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

707 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