home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!usc!sol.ctr.columbia.edu!eff!ssd.intel.com!davidl
- From: davidl@ssd.intel.com (David Levine)
- Newsgroups: comp.text.frame
- Subject: Re: Is there an easy way to get a page count?
- Keywords: FBC pagecount
- Message-ID: <C0pJ5n.25t@SSD.intel.com>
- Date: 11 Jan 93 20:48:59 GMT
- References: <1993Jan8.185833.15597@meadow.uucp>
- Sender: usenet@SSD.intel.com
- Distribution: usa
- Organization: Supercomputer Systems Division (SSD), Intel
- Lines: 33
- Nntp-Posting-Host: geordi
-
- (Sorry for the followup post. I tried to send mail, but "meadow.uucp"
- is not a usable address.)
-
- >We've got a large number of book files, each with several chapter
- >files of varying length, all using folio-by-chapter numbering
- >(page 1-2 follows 1-1, Chapter two pages are numbered 2-1, 2-2, etc.).
- >
- >We need to get estimates on-the-fly for the page count for an arbitrary
- >set of these books, in order to plan binder sizes, etc.
- >
- >We can figure out the manual method (open each file, check number of
- >pages, add to running total), but we're hoping there's an easier way.
- >
- >Does anyone have a suggestion?
- >
- >Please email me and I'll summarize any responses for the group.
-
- Try this:
-
- 1. Print the book to a PostScript file.
-
- 2. Use the following command:
-
- egrep -c '%%Page:' <file>.ps
-
- It's a bit of a hack, but it's fairly easy to use and it works. Two
- caveats: it may need more disk space than you've got to print the whole
- book to a PostScript file, and you must wait for the background print
- process to complete before you can do the "egrep -c". (If the "egrep
- -c" comes up zero, wait a minute and try it again.
-
- - David D. Levine, Intel Supercomputer Systems Division == davidl@ssd.intel.com
- "I don't mind, the thing that bothers me is SOMEONE KEEPS MOVING MY CHAIR!"
-