Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!psuvax1!psuvm!cxt105 From: CXT105@PSUVM.BITNET (Christopher Tate) Newsgroups: comp.lang.postscript Subject: Re: How do you count the number of pages in a postscript document? Message-ID: <89294.141302CXT105@PSUVM.BITNET> Date: 21 Oct 89 18:13:02 GMT References: <1955@cunixc.cc.columbia.edu> <1517@tukki.jyu.fi> <1361@scaup.cl.cam.ac.uk> <2677@hydra.gatech.EDU> Organization: Penn State University Lines: 26 > > 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. > As I recall, the original question was to be able to tell how many pages the document will print *before* actually printing it. This would be quite useful to me here, for example, where I am charged 20 cents per page for any laser printing done on a public printer. While word processors can tell you how many pages will print, PostScript downloads won't, and so it becomes necessary to try to guesstimate how much money it's going to take.... (BTW, the per-page charging is done on the fly, through a VendaCard (tm) machine attached to the paper-feed mechanism of the printers. If you don't put the card in the machine, the printer thinks its out of paper.) ------- Christopher Tate | cxt105@psuvm.psu.edu | You can lead a horse to water, ..!psuvax1!psuvm.bitnet!cxt105 | but a vest has no sleeves. cxt105@psuvm.bitnet |