home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / text / frame / 3897 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.8 KB

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