Article View: comp.lang.postscript
Article #1302Re: PS page counter
From: Roy Smith
Date: Fri, 10 Nov 1989 14:17
Date: Fri, 10 Nov 1989 14:17
19 lines
1355 bytes
1355 bytes
Unfortunately, the short answer is "you can't". PostScript is a
real programming language with loops and functions. One could, if they
wanted, write the PS version of "for = 1 to 1000000, print 'hello'" and
unless your printer accounting software had a full postscript interpreter
in it, there would be no way to know that this little 1-line print file
would produce thousands of pages of output.
In practice, however, most programs which produce PS output are
fairly well behaved and produce "%%Page" comments at the appropriate places
in the PS file, and don't do any looping. It would be straight-forward to
parse the file and look for those, but you would only be able to account
for usage by honest people using well-behaved programs.
--
Roy Smith, Public Health Research Institute
455 First Avenue, New York, NY 10016
{att,philabs,cmcl2,rutgers,hombre}!phri!roy -or- roy@alanine.phri.nyu.edu
"The connector is the network"
Technical Details
Message-ID:
<4108@phri.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!yale!cmcl2!phri!royReferences:
<1consult@physc1.byu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!yale!cmcl2!phri!roy From: roy@phri.UUCP (Roy Smith) Newsgroups: comp.lang.postscript Subject: Re: PS page counter Message-ID: <4108@phri.UUCP> Date: 10 Nov 89 14:17:42 GMT References: <1consult@physc1.byu.edu> Reply-To: roy@phri.UUCP (Roy Smith) Organization: Public Health Research Institute, NYC, NY Lines: 19