We are trying to assemble a free software stack to get detailed print job accounting information, something similar to what Papercut Printlogger does, for raw printing queues. We have been testing Apple Common Unix printing system (Cups) in Debian GNU is not Unix (GNU)/Linux with Pykota Tee for Cups (Tea4Cups).

In Cups, Hewlett-Packard (HP) Printer Control Language (PCL) printing job files include an HP Printer Job Language (PJL) header with job information such as number of copies, duplex or simplex, colour or black & white &c. HP even defines both PCL and PJL in the same document.

In Microsoft (MS) Windows, each print job is queued as two files: an Spool (SPL) one which has the print file itself, in whichever language: Adobe Postscript (PS), HP PCL, Epson Standard Code for Printers (Esc/P), whatever; and a Shadow (SHD) file with the PJL information.

As far as we have been able to determine, Postscript print jobs in Cups do not include nothing equivalent to PJL or SHD, neither in the PS file itself nor in a separate file.

So, is it possible to get such print job information in Cups?

  • ¿Is any information missing, or should this question be in any other Stack exchange site?
    – Leandro
    Commented May 14, 2018 at 13:43

1 Answer 1


CUPS also (temporarily) stores print jobs in (at least) two different files. For a given job ID of 123456 composed of a single-document job, these would be:


For a given job ID of 123457 composed of multiple documents, these would be:


Here, the d.... file represents the actual data file containing the job's document exactly as it was submitted by the CUPS client (and before the CUPS filtering chain for converting the job file to the target printer's desired format).

The c.... file represents the job control file which holds all the relevant meta information about the job (most importantly perhaps: the printing options the user wanted, like "duplex, stapled, with paper from tray 3").

The problem for me, earlier today was how to dissect the c.... file and extract all the gory details from it, because it is not in clear text. Running strings against it, revealed some, but not all.

I started to search almost all of StackExchange for an answer... which is when I noticed this related question here. Then I search-engined for more info, but still no useful result.

Finally, I even asked a question on StackOverflow about this myself:

Then I continued with searching the CUPS source code on Github for any clues. After a few hours, I found the answer:

  • Use a utility which you can build from CUPS sources (but which does not build as a default Makefile target, and hence does not ship on ANY Linux distro I know of nor on macOS): it is named testipp.

See my own answer to above linked StackOverflow question here:

Screenshot of my StackOverflow answer

Unfortunatly, these useful utils are not packaged by any distro! If you know a distro packager person, please point them to this issue and ask him/her to have a look!

  • Thanks a lot! Too bad my bounty on this question expired already, you certainly earned it.
    – Leandro
    Commented Dec 11, 2018 at 14:46
  • @lfd: I didn't see there was any bounty on this even... Commented Dec 11, 2018 at 19:27
  • There was, but it expired already, sorry.
    – Leandro
    Commented Dec 11, 2018 at 20:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .