[cups] Possibility to run a script as part of print workflow?

Jeff Dyck fsjjeff at gmail.com
Thu Sep 21 13:37:37 PDT 2023


Hello all,

I’ve been trying to research a manner of injecting a script into the CUPS workflow to parse the ARGV[5] arguments in an IPP-Everywhere workflow.  Lots of Google searches have pointed me to Tea4Cups, but after a lot of playing around it seems rather obsolete and unsupported.

Thanks in advance to anyone who can point me in the right direction to find a way to have a script run against all print jobs...


More details for those who want them:

Basically we’ve moved to a complete CUPS based print system for our Macs and iOS devices, utilizing IPP-Everywhere and DNS-SD based discovery for driverless printing on all our devices. In general this has been very promising, EXCEPT our PaperCut accounting / tracking solution doesn’t know how to parse IPP-Everywhere print jobs (even though all the data is sitting there right in the command line arguments of the jobs) and completely screws up how it logs those jobs…

Specifically it strips off the copies attribute (argv[4]), and doesn’t properly parse color vs monochrome, and on more recent versions of the PaperCut Provider even seems to strip out additional attributes like duplex and finishing options.

I’m hoping to create a script that would use a PDF parser command line tool to tell me # of pages (and perhaps even the balance of B&W vs color pages), and then parse the arguments to see whether it’s a color or B&W print, duplex, and other options selected and copies and then use the PaperCut API to upload that data direct… 

Sadly after long talks with PaperCut they’ve basically told us they’re aware they have no IPP-Everywhere support, that it’s on the list for “eventually”, but after nearly 2 years now I still have no idea when or if it’s ever something they will tackle and could we just leave them alone…

Jeff


More information about the cups mailing list