🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1211

Re: How do you count the number of pages in a postscript document?

#1211
From: Robert Viduya
Date: Fri, 20 Oct 1989 23:58
44 lines
2769 bytes
> 
> However, the situation for knowing how many pages a document *did*, in
> fact, print is rather better, and doesn't need the patch that Geoff
> Cooper posted. The "pagecount" operator in "statusdict" (see page 296
> of the Red Book) gives you the number of pages ever printed by the
> LaserWriter (or since the last time the EEROM was replaced, anyway).
> You can take the difference of its value at the start and end of a job,
> and print the difference in an operator message, or on a cover page.
> 
> The determined user will be able to cheat even on this unless you
> execute both examinations of the page count in nice, clean, start of
> job, PostScript environments. This requires keeping the initial value
> external to the LaserWriter. (Or perhaps Geoff can work out for us how
> to keep it in a protected, exitserver-installed, piece of workspace
> that survives between jobs!)
> 

I've managed to do this for our publicly accessible PostScript
printers so that we can do accurate page accounting for them.
Specifically, the first time a printer is accessed after power-up, a
small job gets sent down that does an "exitserver" and then redefines
the serverloop.  The new serverloop sends a message to the host after
each job with the number of pages that job used.

The main problem with this is that the serverloop differs from printer
to printer and PostScript ROM level to PostScript ROM level.  We have
QMS PS2000's, Apple LaserWriter II NTX's and one LaserWriter Plus.
The serverloop mods for the QMS's and the NTX's were different but
very similar.  We retired the LaserWriter Plus because the serverdict
dictionary wasn't big enough for us to add just one more item (it was
showing its age anyway).

Working out how to change the serverloop requires dumping the
dictionaries in the printer and browsing around.  If you can code
PostScript and can handle doing that sort of thing, it isn't all the
difficult, just a bit time consuming.

			robert

--
Robert Viduya					   robert@shangri-la.gatech.edu
Office of Computing Services
Georgia Institute of Technology					 (404) 894-6296
Atlanta, Georgia	30332-0275
Technical Details
Message-ID: <2677@hydra.gatech.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!wuarchive!psuvax1!gatech!prism!shangri-la.gatech.edu!robert
References: <1955@cunixc.cc.columbia.edu> <1517@tukki.jyu.fi> <1361@scaup.cl.cam.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!wuarchive!psuvax1!gatech!prism!shangri-la.gatech.edu!robert
From: robert@shangri-la.gatech.edu (Robert Viduya)
Newsgroups: comp.lang.postscript
Subject: Re: How do you count the number of pages in a postscript document?
Message-ID: <2677@hydra.gatech.EDU>
Date: 20 Oct 89 23:58:14 GMT
References: <1955@cunixc.cc.columbia.edu> <1517@tukki.jyu.fi> <1361@scaup.cl.cam.ac.uk>
Sender: news@prism.gatech.EDU
Reply-To: robert@shangri-la.gatech.edu (Robert Viduya)
Organization: Office of Computing Services, Georgia Tech
Lines: 44