Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Print job staying in queue
Author Message
RichardR
Member
# Posted: 1 Apr 2007 11:37


Hello

We've purchased the virtual printer driver and are now using them. However, we've noticed that the last print job stays in the queue. We've had a couple of complaints about this from clients thinking their documents haven't printed correctly (even through they have).

Is there anyway to tell the printer device to remove the job from the queue once it's finished.

Thanks, Richard

RichardR
Member
# Posted: 1 Apr 2007 11:37


Sorry, forgot to include email notifications

Eugene Starkov
Member
# Posted: 3 Apr 2007 03:43


It's a peculiarity of our virtual printing technology.
That print job has status "Printed" so there are no any errors.
Sorry, it's required the last print job to be in the list.

kuma
# Posted: 15 Apr 2007 03:55


I fixed the problem by forcing to clear the print job with my application.

HANDLE hPrinter = 0;
PRINTER_DEFAULTS pd;
ZeroMemory(&pd, sizeof(pd));
pd.DesiredAccess = PRINTER_ACCESS_USE;
int rtc;
rtc = OpenPrinter("my print name", &hPrinter, &pd);
ASSERT(rtc);
DWORD bytes_req; /* Bytes req'd for data */
DWORD bytes_copied;
LPBYTE JobsInfo = NULL;
JOB_INFO_1* ptr;
int JobId = 0;
rtc = EnumJobs(hPrinter, 0, 1, 1, JobsInfo, 0, &bytes_req, &bytes_copied);
if(rtc==FALSE && bytes_req > 0) {
JobsInfo = (LPBYTE)calloc(bytes_req, sizeof(char));
rtc = EnumJobs(hPrinter, 0, 1, 1, JobsInfo, bytes_req, &bytes_req, bytes_copied);
ptr = (JOB_INFO_1 *)JobsInfo;
JobId = ptr->JobId;
rtc = SetJob( hPrinter, JobId, 0, NULL, JOB_CONTROL_CANCEL);
ASSERT(rtc);
}
rtc = ClosePrinter(hPrinter);
ASSERT(rtc);

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.014

 

Page top