Forum: Ruby Print quota management in Ruby?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
426d8be2204a36c4e609ace097d7c554?d=identicon&s=25 Ohad Lutzky (ohad)
on 2006-05-17 16:23
I'm a unix admin at a lab, and we use Pykota to manage print quotas
(essentially, each user has a 'balance', each printer has a 'cost per
page', and Pykota manages that). I've grown to hate Pykota (it was
installed before my time), and so have the other admins. Unable to find
alternatives, I thought I might be able to write my own.

Requirements:
  - Per-user granular modifications - ability to precisely set a user's
quota,
    or give him unlimited quota.
  - One printer will be enough.
  - Printable from Windows workstations over Samba (this is what makes
it tricky,
    otherwise I'd just hack up an alternative lpr)
  - Users need to be able to see how much quota they have left

Bonus points:
  - Web-based interface for administration (simple if data is kept in
SQL, then
    I can use Rails)
  - Web-based queue-view (much less important)
  - Error message when out of queue displayed on the Windows box while
attempting
    the print.

It would be nice if I could just have an "upload your file, we'll print
it"
solution, but since people want to print Powerpoint slides (in Hebrew,
which
Openoffice doesn't properly convert), that's not possible. (Adobe
Acrobat isn't
installed on the workstations, so we can't make people upload PDFs.

The big questions are these:
  - Do I 'spoof' a printer for the queue? Or do I 'block' other printers
like Pykota does? Something else perhaps?
  - How do I count pages? Will postscript be able to do that?

Any input would be appreciated.
E34b5cae57e0dd170114dba444e37852?d=identicon&s=25 Logan Capaldo (Guest)
on 2006-05-17 21:43
(Received via mailing list)
On May 17, 2006, at 10:23 AM, Ohad Lutzky wrote:

>   - Do I 'spoof' a printer for the queue? Or do I 'block' other
> printers
> like Pykota does? Something else perhaps?
>   - How do I count pages? Will postscript be able to do that?
>
> Any input would be appreciated.
>

Oh but you can. Don't share a real printer. Install ghostscript, and
use that to produce .ps in some directory when people "print", which
you can then convert to pdf if you want (ps2pdf) or send off as is to
the real printer. They still get to click on file > print, and you
still get the benefits of upload your file and we'll print it scenario.

As far as displaying a message on the windows box, I believe you can
use samba to send 'net send msg' style messages.
This topic is locked and can not be replied to.