[cups.development] How to read the current job details such as number of pages , copies

Michael Sweet msweet at apple.com
Mon Feb 1 08:40:11 PST 2010


On Feb 1, 2010, at 3:46 AM, akbar wrote:
> Hi Michael Sweet,
> 
> I am very Thankful to you Michael Sweet.
> 
> After passing Printer Name in argv[i],my code got executed.Now I am able to pause for the current job.
> 
> Now I want to read the current job details (such as number of pages ,copies ,size etc.)  which is in queue after pausing the printer.
> 
> Which API I need to use for reading job details. please help me.


You'll need to do an IPP request (IPP_GET_JOB_ATTRIBUTES) for the job.  Getting the number of pages is a non-starter - we don't require it in job submissions nor do we pre-scan documents to determine the count.  Instead you have to print the job to get the final page count.

___________________________________________________
Michael Sweet, Senior Printing System Engineer







More information about the cups mailing list