Skip to content

ujr/pracc

Repository files navigation

Pracc (Printing with Accounting)

Pracc complements CUPS to do printing with accounting. The pracc package consists of a backend for CUPS and a few tools to manage user's printer accounts.

Pracc Logo

Be sure to read all documentation that comes with pracc. Pracc is not plug-and-play but easy once you understand how it works.

Compilation and installation instructions:

  1. Download the package.
  2. tar xzf pracc-version.tgz
  3. cd pracc/src
  4. Adjust the Makefile!
  5. make
  6. sudo make install

Once pracc is installed, you can use the pracc-check tool to check if the installation is (still) fine.

History

Pracc was created in 2003 at PZM Luzern (a former teacher's college) in response to the headmaster's urge to reduce paper waste around the public printing stations. The system evolved continually and was in heavy use for years at PZM and later at the PHZ Luzern (which is now PH Luzern), and reportedly also at HSLU (the Lucerne University of Applied Sciences and Arts).

Technically, the system started as a print command for Samba that read the printer's page counter before and after printing. When CUPS became more widespread, the system was rewritten as a backend for CUPS. The account information was always kept in append-only plain text files, which proved simple (no database maintenance) and reliable. Students could recharge their printing accounts at the student office, where the secretary had a simple console interface that later changed to a full-fledged Web-based administration interface. The latest changes, experimenting with counting pages in print jobs (see joblex/pracc-scan) in addition to querying the printer device remained unfinished.

Development of Pracc ended in 2008 when I left PHZ Luzern. It remained in use at least until 2013 (when I last provided some support).

Documentation

Pracc was mostly used in-house and there is no comprehensive documentation. Some technical information can still be found in these documents:

Some background can be found in notes from the time Pracc was first created and in a leaflet, as well as in the slides from a SWITCH-organised printing workshop and a longer presentation (all in German). Also available are some technical notes on PostScript and network printing, and the structure of a typical print job.

References

Essential sources of information for the development of Pracc's CUPS backend (and its predecessor called netprint) were:

  • About communicating with a PostScript printer: there's a chapter devoted to that in Advanced Programming in the UNIX Environment by W. Richard Stevens (Addison-Wesley, 1993) (www.apuebook.com)
  • The LPRng documentation had useful information about HP's JetDirect protocol, also known as the Socket API, which was the de facto standard for communicating with network printers.
  • The CUPS documentation
  • About PJL: pjl-qref.html is a local summary of HP's Printer Job Language Technical Reference Manual
  • The notes on Student Printing Quotas by Anthony Thyssen of Griffith University had some influence on my decisions (see a local copy).

The unfinished pracc-scan tool was supposed to count pages in print jobs prior to printing, which required an understanding of the print job and therefore typically PostScript, PCL5 and PCL XL (aka PCL6); PCL5 documentation was easily available, but at the time PCL XL was hard to find (nowadays search the Internet for HP's PCL XL Feature Reference to find the specification).

Screenshots

Views of the Web-based reporting and administration tool (pracc.cgi):

user view
Screenshot: User's view (without admin rights)

main view
Screenshot: Main view (needs admin rights)

account list
Screenshot: Find and list accounts (needs admin rights)

account view
Screenshot: Account view (needs admin rights)