Know the number of pages printed from cups printing

6,234

Solution 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.

Solution 2

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.

Share:
6,234

Related videos on Youtube

Gatura
Author by

Gatura

Updated on September 17, 2022

Comments

  • Gatura
    Gatura almost 2 years

    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

  • Kurt Pfeifle
    Kurt Pfeifle almost 14 years
    - 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)
  • sekrett
    sekrett over 3 years
    Can you please explain what is systemdict and how to configure the spooler?
  • sekrett
    sekrett over 3 years
    When it does not work, I see "Unknown" on the web and 0 in page_log. Does not matter, where you see it.
  • mpez0
    mpez0 over 3 years
    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.