🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.postscript
2 messages
2 total messages Started by McEWAN Shane Wed, 07 Oct 1992 06:43
PostScript page count filter for Unix
#4095
Author: McEWAN Shane
Date: Wed, 07 Oct 1992 06:43
21 lines
1259 bytes
G'day! In recent weeks I've been given the task of gathering accounting
information about our PostScript laser printers attached to our central
server here. Ideally I'd like to keep a record of the number of pages each
job prints.

I was wondering if anyone has written a program that will read
through a PostScript file looking for "showpage" as well as any macros that
include a showpage command.

That's the tricky bit.....you need to effectively write a mini PostScript
interpreter which is something I'm not quite up to, yet. *sigh*

Any hints, tips and tricks (or even full blown solutions ;-) will be much
appreciated.

Catchya!
--

  Shane McEwan     CSIRO Division of Atmospheric Research    spm@dar.csiro.au
================================================================================
              ______|    ______|    __  __|    ____  |    ____  |
Re: PostScript page count filter for Unix
#4110
Author: Vidiot
Date: Thu, 08 Oct 1992 06:37
30 lines
2030 bytes
In article <1992Oct7.064348.18507@aurora.dar.csiro.au> spm@dar.csiro.au (McEWAN Shane) writes:
<G'day! In recent weeks I've been given the task of gathering accounting
<information about our PostScript laser printers attached to our central
<server here. Ideally I'd like to keep a record of the number of pages each
<job prints.
<
<I was wondering if anyone has written a program that will read
<through a PostScript file looking for "showpage" as well as any macros that
<include a showpage command.
<
<That's the tricky bit.....you need to effectively write a mini PostScript
<interpreter which is something I'm not quite up to, yet. *sigh*

You hit the nail right on the head.  A non-DSC compliant PostScript file
could easily render many pages from a single PostScript line of code.  Here's
the even neater part...the number of pages actually printed can be different
each time the line of code is executed.

Your best bet is to obtain the information for each job printed, from the 
printer itself.  Many printers make available the current printed page count.
You ask the printer the value before and after printing.  That will give
you the most accurate count available.

Check the manuals for the printer.  If your printer does support page count,
it will be a simple task to get the numbers from the printer.
-- 
      harvard\                          spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/            INTERNET:vidiot!brown%astroatc.UUCP@spool.cs.wisc.edu
                                   brown@wi.extrel.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads