2

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

Gatura
  • 553
  • 2
  • 9
  • 23

3 Answers3

1

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.

mpez0
  • 1,492
  • 9
  • 9
  • Can you please explain what is systemdict and how to configure the spooler? – sekrett Nov 25 '20 at 11:06
  • 1
    Systemdict is the system dictionary in a PostScript interpreter; it contains system information and configuration items, including the number of pages printed. Look in the PostScript reference book for details. Modifying the spooler depends on what print spooler you're using, but most allow for pre- and post- job scripts. – mpez0 Nov 26 '20 at 00:42
1

I know this topic is very old but i am searching this for months (i dont found any solution for this in any forum, but only disappointed people about this issue).

The problem is that cups does not count pages sent to the cups server, counting one page. (I think your mac are serving the network as a central printer server isn't?)

There is a workaround, just change the windows Driver to Generic -> Ms Publisher Imagesetter - Now Cups can understand what this Windows driver is saying and translate it to the printer (printing normal with the wrong driver (it works for my Hp Laserjet Professional)), so you will be able to see the page counting perfect in /var/log/cups/page_log, but the printing quality can decreases.

0

Are you refering to the page_log file which CUPS maintains, when you talk about "the column for pages"?

Did you see these pieces of documentation (which is valid for Mac OS X as well) ?

Also suggested:

Magellan
  • 4,431
  • 3
  • 29
  • 53
Kurt Pfeifle
  • 1,746
  • 2
  • 12
  • 19
  • - http://printing.kde.org/faq/cups.php#HowdoesCUPSpageaccountingwork (looks like I had to add the 2nd link as a comment -- serverfault wouldn't allow 2 at once) – Kurt Pfeifle Jul 07 '10 at 17:10
  • When it does not work, I see "Unknown" on the web and 0 in `page_log`. Does not matter, where you see it. – sekrett Nov 25 '20 at 11:07