Re: Printer Queue
- From: Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx>
- Date: Sun, 14 Oct 2007 17:36:24 -0400
vertuas wrote:
Hi all,If you look in the WIn32 help, You can use the
I have written an autmated application that prints photographs off.
People choose a background and a forground, and create there out picture, then the picture prints.
I am however having some problems with the print queue. When the printer runs out of paper, all the photos back up in the queue, ever after replacing the paper the queue won;t clear. A restart still leave the queue full
Is the a way that i can clear the print queue?
Even better is there a way that i can tell that a document failed to print, so i can stop attempting to print more photos when there is a problem?
Thanks
Vert
EnumJobs, and GetJob which will return data.
the handle you need would be that of what you're already
using from the assumed TPrinter unit.
One example of returned data.
DWORD JobId;
LPTSTR pPrinterName;
LPTSTR pMachineName;
LPTSTR pUserName;
LPTSTR pDocument;
LPTSTR pDatatype;
LPTSTR pStatus;
DWORD Status;
DWORD Priority;
DWORD Position;
DWORD TotalPages;
DWORD PagesPrinted;
SYSTEMTIME Submitted;
Status
Specifies the job status. This member can be one or more of the following values:
JOB_STATUS_DELETING
JOB_STATUS_ERROR
JOB_STATUS_OFFLINE
JOB_STATUS_PAPEROUT
JOB_STATUS_PAUSED
JOB_STATUS_PRINTED
JOB_STATUS_PRINTING
JOB_STATUS_SPOOLING
You need to specify at which level of information you need.
You can perform this in a wait state function loop after
you send a page and make sure the spooler is flushed.
--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: Printer Queue
- From: vertuas
- Re: Printer Queue
- References:
- Printer Queue
- From: vertuas
- Printer Queue
- Prev by Date: Re: D5 - Class\Collection example??
- Next by Date: Re: D5 - Navigation shortcuts
- Previous by thread: Printer Queue
- Next by thread: Re: Printer Queue
- Index(es):
Relevant Pages
|