[cups.development] Reg Number of pages in cups

Kurt Pfeifle k1pfeifle at gmx.net
Fri Feb 11 13:22:46 PST 2005


On Friday 11 February 2005 12:10, Mohammed Riyaz wrote:

> The cups web interface for jobs, does not have the number of 
> pages for the job. Why was this important feature left out? 
> Will it be included in cups 1.2?  
> 
> Could some one tell me how this feature could be added to the 
> existing versions?? 
> 
> Thank you,
> Mohammed Riyaz P.

Hi, 

this is very simple to achieve...

1. Locate the jobs.tmpl file on your system. This is likely to be found
   in "/usr/share/cups/templates/jobs.tmpl"

2. Find these three lines in the file:
     <TH>Size&nbsp;</TH>
     <TH>State&nbsp;</TH>

3. Add one more line and modify it like this:
     <TH>Size&nbsp;(kByte)&nbsp;</TH>
     <TH>Page(s)&nbsp;</TH>
     <TH>State&nbsp;</TH>

4. Find three more lines in the file:
     <TD>{job_k_octets}k&nbsp;</TD>
     <TD>{job_state=3?pending since<BR>{time_at_creation}:{job_state=4?held since<BR>{time_at_creation}:

5. Add one more line and modify it like this:
     <TD>{job_k_octets}k&nbsp;</TD>
     <TD>{job-media-sheets-completed}&nbsp;</TD>
     <TD>{job_state=3?pending since<BR>{time_at_creation}:{job_state=4?held since<BR>{time_at_creation}:

That's it. No re-start of cupsd required. Just reload or view the page 
http://127.0.0.1:631/jobs?which_jobs=completed.

Note that this will only work for *completed* jobs, because CUPS knows
only after fact how many pages there were in a file.

Cheers,
Kurt





More information about the cups-devel mailing list