Know the number of pages printed from cups printing

cupsprint-server

I am using the CUPS print server on a MAC to manage printing, I would like to know the number of pages that are printed by any user for any job, however the column for pages writes unknown for each printing job.

How can I go about this

Best Answer

If you're printing PostScript files, you really can't tell how many pages will be printed without interpreting the file and counting them. If you need this, you can modify the spooler to get total pages printed from the systemdict before and after the job, and use the difference.

Non-PS printers may differ.