Failure to Print Multiple Copiee with Raw Option

Don Badrak dbadrak at
Mon Sep 15 10:56:31 PDT 2008

> > There is one slight problem -- it no longer logs to the /var/log/cups/page_log when it completes.  Is there something I'm missing in the script? Thanks.
> OK, you'll need to add an echo with a PAGE: message with the number
> of pages in the PDF file.  The pdfinfo command will give you a page
> count, and then you can multiply by the number of copies and write
> a message like this:
>      pages=`pdfinfo $ifile | grep '^Pages:' | awk '{print $2}'`
>      total=`expr $pages \* $copies`
>      echo "PAGE: total $total" 1>&2

That's almost it.  It generates this:

file-plotter-6 root 442 [15/Sep/2008:13:51:09 -0400] total 3 - localhost

compared to this for a normal job:

plotter-6 root 438 [12/Sep/2008:14:11:11 -0400] 1 1 - localhost

According to the help (docs/help/ref-page_log.html):

  printer user job-id date-time page-number num-copies job-billing

   The page-number and num-pages fields contain the page number and number of copies being printed of that page. For printers that cannot produce copies on their own, the num-pages field
   will always be 1.

shouldn't this then be:

echo "PAGE: $pages $copies" 1>&2

I am a bit confused on this help section. Is the second number the number of copies or the number of pages?

Thanks so much for your help.


More information about the cups-devel mailing list