Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 1996 16:31:53 +0200 (MESZ)
From:      "Hr.Ladavac" <>
To: (Mark Tinguely)
Subject:   Re: Printer accounting woes
Message-ID:  <>
In-Reply-To: <> 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

> --mark.

Want to link to this message? Use this URL: <>