This directory contains Print Release System (c) 2009 by Toby Norden and Steven D. Brewer
distributed as free software under the GNU General Public License.

      Name                    Last modified      Size  Description
Parent Directory - CHANGELOG.txt 07-Jan-2010 13:18 280 HEADER.txt 22-Oct-2009 10:17 158 README.txt 28-Oct-2009 15:45 2.6K README.txt~ 22-Oct-2009 10:17 2.6K printrelease-1.0.1.t..> 28-Oct-2009 15:44 20K printrelease-1.0.2.t..> 07-Jan-2010 13:17 20K printrelease-1.0.tar.gz 22-Oct-2009 10:20 20K
Print Release System 
(c) 2009 Toby Norden and Steven Brewer

I was unable to find a good, free, piece of software to provide web-based 
management of System V printing.  For that purpose, I've created this 
Print Release System, which sits between Samba and the System V printing
system.  It ought to be relatively easy to make it work with other
printing systems too.

The system works by telling Samba to submit print jobs using a custom 
print command in smb.conf:
  print command = /usr/local/samba/lib/pagecount.php %p %s %u

The pagecount.php script submits the printjob, but tells the printing
system to hold the job.  In System V printing, this is "lp -H hold".  It
also parses the postscript of the job to calculate the number of pages
and stores the result in a mysql database.

After the job is printed, the user needs to consult a webpage that
shows their queued jobs, which can be selected and released for
printing (or canceled). A record is maintained for each job and,
once the user reaches a quota, they can't release any further jobs
to the printer.

Most of the configuration options are in the config.php file.  There
are a few gotchas: (1) you need to create two mysql users for the
system.  The first should be privileged only to insert into the queue
table:
  grant insert on pagecounts.queue to 'username'@'localhost' identified by 'password';
The limited user is for the pagecount.php script -- since that script
needs to run as the user, it must be readable by all users on the system,
hence the unprivileged mysql user.  The other user only needs to be
able to insert, select, and delete.

There is a management tool (manage.php) that allows administrators
to add quota to users and a reporting tool (report.php) that will
provide a summary showing an ordered list of users and how much
they've printed.

Finally, there is also a cron script that can be run periodically
that deletes queued jobs that haven't been printed and cleans up
the queue table in the database.

----

Print Release System
Copyright (C) 2009  Toby Norden and Steven D. Brewer

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.