Path: utzoo!attcan!uunet!samsung!sdd.hp.com!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!kings.wharton.upenn.edu!lau From: lau@kings.wharton.upenn.edu (Yan K. Lau) Newsgroups: comp.lang.postscript Subject: Re: PostScript page counter? Message-ID: <27630@netnews.upenn.edu> Date: 31 Jul 90 13:57:30 GMT References: <1990Jul26.173633.13911@msuinfo.cl.msu.edu> <1990Jul30.153325.15342@zoo.toronto.edu> <1990Jul30.181713.29483@phri.nyu.edu> <6988@helios.TAMU.EDU> <226@heaven.woodside.ca.us> Sender: news@netnews.upenn.edu Reply-To: lau@kings.wharton.upenn.edu (Yan K. Lau) Organization: A Private Heaven Lines: 23 In article <226@heaven.woodside.ca.us> glenn@heaven.UUCP (Glenn Reid) writes: > >Any volunteers to write the simple parser? If it can recognize the >basic syntax > > /name { { stuff } } > >I suspect that you could find the procedure that contained "showpage" >fairly easily. Any volunteers? Want to endear yourself to the > >(Glenn) cvn I suspect most applications generate "well-behaved" code that a simple parser can be used to count pages. But users can get very devious if they write their own code or change the code of a PS file generated by an application. Two things that I can think of off the top of my head. The user can replace the showpage with a copypage and erasepage. Also, the parser would need to deal the the #copies. Looks like the simple parser needs a little more work. Yan. )~ Yan K. Lau lau@kings.wharton.upenn.edu The Wharton School ~/~ -Sheenaphile- 128.91.11.233 University of Pennsylvania /\ God/Goddess/All that is -- the source of love, light and inspiration!