🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #4960

Re: postscript accounting

#4960
From: Vidiot
Date: Sat, 09 Mar 1991 05:48
26 lines
1962 bytes
In article <YXOC.91Mar8143905@fb14vax.cs.uni-sb.de> yxoc@cs.uni-sb.de (Ralf Treinen) writes:
<Sorry if this is a dumb question, I do not (yet) know anything about
<postscript (crazy, but true).
<
<We are going to buy a postscript printer and would like to monitor the
<usage of the printer. For this purpose we would like to have a tool that
<is able to count the pages of a postscript file. Does this make any sense
<to you? Can you tell me how to write/get such a thing?

Unless I am missing something here, you can't always know the number of
pages that will be printed just by looking at the PostScript file.  The
program could easily have repeat and for loops that could print many, many
pages with only a single line of PostScript code.

What you will have to do is send out a piece of code that will determine the
numbers of pages printed so far, send the PostScript file and ask the printer
the same question again.  Subtract the two numbers and you are all set.
This information is available in the statusdict.  See the manual for the
printer to determine the PostScript procedures available to pull the number
of pages printed so far.  I don't have the QMS PS-810 manual here at home
and the LaserWriter IINT manual doesn't contain this info, otherwise I
post a little piece of code to fetch the page number.
-- 
      harvard\     att!nicmad\          spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INTERNET:vidiot!brown%astroatc@spool.cs.wisc.edu
Technical Details
Message-ID: <1475@vidiot.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!uwvax!astroatc!vidiot!brown
References: <YXOC.91Mar8143905@fb14vax.cs.uni-sb.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!uwvax!astroatc!vidiot!brown
From: brown@vidiot.UUCP (Vidiot)
Newsgroups: comp.lang.postscript
Subject: Re: postscript accounting
Message-ID: <1475@vidiot.UUCP>
Date: 9 Mar 91 05:48:44 GMT
References: <YXOC.91Mar8143905@fb14vax.cs.uni-sb.de>
Reply-To: brown@vidiot.UUCP (Vidiot)
Distribution: comp
Organization: Vidiot's Hangout
Lines: 26