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