Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 1996 16:31:53 +0200 (MESZ)
From:      "Hr.Ladavac" <lada@ws2301.gud.siemens.co.at>
To:        tinguely@plains.nodak.edu (Mark Tinguely)
Cc:        andersoj@enc.edu, freebsd-questions@freebsd.org
Subject:   Re: Printer accounting woes
Message-ID:  <199608201431.AA098111513@ws2301.gud.siemens.co.at>
In-Reply-To: <199608201341.IAA07772@plains.nodak.edu> from "Mark Tinguely" at Aug 20, 96 08:41:30 am

next in thread | previous in thread | raw e-mail | index | archive | help
E-mail message from Mark Tinguely contained:
> 
> If you do not have serial line to every printer, you still can get a pretty
> good *text* page count by counting carriage returns and form feeds in the
> output filter. This is pretty useless for postscript files, but then a person
> could work a filter program using gs to count the pauses between gs processing
> the postscript pages.

For PostScript you could hack a gs driver which doesn't emit anything in
normal case, and emits only something easily parsable (e.g. newline) 
whenever it has to flush a page.  Then count the characters :)

Such a driver should be farely trivial (on order of 20 C lines or so) and
pretty resource-wasteful only to count pages, but absolutely reliable :)

Or, you can hack the existing drivers so that they *always* print out the
page flush message to stderr, and then account for them.  Same trivial
change.

/Marino
> 
> --mark.
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608201431.AA098111513>