home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / text / tex / 13271 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.9 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!network.ucsd.edu!mvb.saic.com!info-tex
  2. From: cczdao@mips.nott.ac.uk (David Osborne)
  3. Newsgroups: comp.text.tex
  4. Subject: Re: how many pages in a dvi file
  5. Message-ID: <21539.722021831@mips.nott.ac.uk>
  6. Date: 17 Nov 92 17:37:11 GMT
  7. Article-I.D.: mips.21539.722021831
  8. Organization: Info-Tex<==>Comp.Text.Tex Gateway
  9. Lines: 30
  10. X-Gateway-Source-Info: Mailing List
  11.  
  12. In message <721931672.294909.BNB@MATH.AMS.ORG>  of 16 Nov 92 11:34:32 EST,
  13. bbeeton said:
  14.  
  15.  > we frequently receive dvi files that are to be printed on one of
  16.  > our typesetters.  it would be quite useful to be able to determine
  17.  > quickly how many pages are in a particular dvi file.
  18.  
  19. We need this in our script which users use to print a DVI file, so
  20. they can be told how many pages will be printed (and the cost, since
  21. laser output is chargeable), and asked for confirmation of the print
  22. request.
  23.  
  24.  > it shouldn't be difficult to extract from dvitype the code to
  25.  > perform this check.  but (1) we don't want to reinvent any wheels,
  26.  > and (2) we haven't really got the time.  if anyone out there has
  27.  > already created such a utility, we'd really appreciate learning
  28.  > about it.
  29.  
  30. Since we work in a PostScript environment, we took the easy way out,
  31. by translating the DVI to PostScript (using dvitops) and using grep to
  32. count the number of times '%%Page:' occurs.  This suits our needs,
  33. since the user might use the page-selection options in the DVI driver
  34. to print only a subset of the pages in the DVI file, and might also
  35. select many-up printing for proofing.  By scanning the processed
  36. PostScript, we can find how many real pages will be generated.  We
  37. haven't yet decided on how duplex printing fits into this scheme...
  38. two pages duplexed onto one sheet are charged as for two separate sheets.
  39.  
  40. ~~David Osborne
  41.   Cripps Computing Centre, University of Nottingham
  42.