[cups.development] Adding Banners to Jobs via move_jobs function (scheduler/ipp.c)

Michael Sweet msweet at apple.com
Fri Jul 2 08:55:47 PDT 2010


On Jun 24, 2010, at 11:06 AM, James wrote:
> I am in process of working with a solution that processes jobs by queuing all jobs that come in without a printer assignment, then letting the user choose their printer after-the-fact. This has created a couple of concerns in that several verifications that are done in scheduler/ipp.c:add_job() function don't get run and/or properly verified against.
> 
> I have solved most of these issues by copying code from add_job to move_job and changing the references to mean destination printer.
> 
> The problem I am still running into is that while I have been able to get it to add the Starting and Ending Banners to the document, it's appending both banners to the end. The desired affect would have been to have it put the Starting Banner at the front of the job.

You'll need to rename the existing job file(s) (start at the last file in the job and move to the first, incrementing the file number MMM at the end of 'dNNNNN-MMM'), then set the number of files to 0 before calling copy_banner.  Restore the number of files afterwards (+1) and then call copy_banner again.

FWIW, what you are trying to do is implement the IPP Resubmit-Job operation, which will be appearing in a future CUPS release near you.  CUPS-Move-Job was never designed to change the job settings, particularly the job-sheets (banner) values specifically because we create the banner files at job creation time...

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair








More information about the cups-devel mailing list