hold jobs by default (Cups conf or Java)

Tarik Benabid anonymous at easysw.com
Wed Jul 28 05:23:07 PDT 2004


there are two different IPP operations in the cups/ipp.h ( in IPPDefs.java they are called HOLD_JOB and HOLD_NEW_JOBS)

IPP_HOLD_JOB

IPP_HOLD_NEW_JOBS

even I can't use HOLD_NEW_JOBS variable, it's possible to write a function and use this one "public int cupsHoldJob( String printer_name,int    p_job_id,String p_user_name ) // printer_name is optionnal" I just copied the cupsCancelJob(...) (in cups/scripting/java/.../Cups.java )  and change IPPDefs.CANCEL_JOB by IPPDefs.HOLD_JOB

have you tried to use IPP_HOLD_NEW_JOBS?

T.B


pieterjandeboeck wrote:
>
> Also: you wanted to cancel jobs. thats easier to do. Use the method
>
> -cupsCancelJob(destination, jobID)
>
> destination is printer
> jobid is an integer for the printjob
>
>
> you can get both using:
>
> currentNewJobCount = cupsGetJobs( &jobs, JOBS_FROM_ANY_DEST, JOBS_FROM_ANY_USER, ONLY_PROCESSING_JOBS);
>
> where I defined statics const ints to make it more readable: the values of the arguments are 0's and 1's. See documentation for the specific values for your needs.
>
> the destination printers and ids can be extracted from the array of jobs you created prior:
>
> cups_job_t  *jobs;
>
> extract values as follows:
>
> currentWindowDestination = jobs[i].dest;
> currentWindowJobID       = jobs[i].id;
>
>
>





More information about the cups-devel mailing list