🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.laser-printers
Article #365

Re: Counting PostScript Pages

#365
From: Andy Sun Anu-guest
Date: Fri, 15 Mar 1991 19:58
32 lines
2127 bytes
kludge@GRISSOM.LARC.NASA.GOV (Scott Dorsey) writes:

>In article <9103132037.AA25632@crayola.cs.UMD.EDU> jlg@UNCCVAX.UNCC.EDU (john l grant) writes:
>>
>>Does anyone have a filter program that will count Postscript
>>pages before the file goes to the printer?  I've taken a quick 
>>look at the Postscript language and believe such a program would 
>>be possible.  It's certainly more involved that looking at the 
>>size of the file, but definately possible.

>how about
>   egrep showpage | wc -l

>Crude but fairly efficient.
>--scott

The above will probably not work in most cases, unless we are dealing with
home-made PostScript programs. Almost all PostScript drivers, be they
PC, Macintosh, or Unix-based, do not use showpage explicitly. Instead,
it is buried somewhere in the prologue definitions. You will probably
end up with a 1 all the time if you use the above. By the way, some
drivers uses the combination of copypage and erasepage, so checking for
showpage is usually not sufficient. Of course if you can garantee that users
are always printing from a particular software with a particular prologue
definition, you can sort of jury-rig something just for that format.

Andy

_______________________________________________________________________________
Andy Sun                            | Internet: sun@me.utoronto.ca
University of Toronto, Canada       | UUCP    : ...!utai!me!sun
Dept. of Mechanical Engineering     | BITNET  : sun@me.utoronto.BITNET
Technical Details
Message-ID: <9103181601.AA11439@crayola.cs.UMD.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac,att!ucbvax!ME.UTORONTO.CA!sun
References: <9103132037.AA25632@crayola.cs.UMD.EDU> <9103141524.AA00940@crayola.cs.UMD.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac,att!ucbvax!ME.UTORONTO.CA!sun
From: sun@ME.UTORONTO.CA (Andy Sun Anu-guest)
Newsgroups: comp.laser-printers
Subject: Re: Counting PostScript Pages
Keywords: postscript, accounting
Message-ID: <9103181601.AA11439@crayola.cs.UMD.EDU>
Date: 15 Mar 91 19:58:47 GMT
References: <9103132037.AA25632@crayola.cs.UMD.EDU> <9103141524.AA00940@crayola.cs.UMD.EDU>
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: U of Toronto, Dept. of Mechanical Engineering
Lines: 32
Approved: laser-lovers@brillig.umd.edu