home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.postscript
- Path: sparky!uunet!psinntp!ficc!peter
- From: peter@ferranti.com (peter da silva)
- Subject: Re: printing a range of pages from a postscript file
- Message-ID: <id.ES1W.3M2@ferranti.com>
- Organization: Xenix Support, FICC
- References: <1h7flvINNjc1@tamsun.tamu.edu>
- Date: Wed, 23 Dec 1992 00:48:09 GMT
- Lines: 28
-
- In article <1h7flvINNjc1@tamsun.tamu.edu> vamsee@abgen.tamu.edu (Vamsee Lakamsani) writes:
- > I have an 80 page postscript document and I need only pages 50-60,75,
- > 78 and 80 (this is just a silly example). Is there someway that I can tell
- > the printer to print only these pages?
-
- Something like:
-
- awk 'BEGIN { printing=1 }
- /^%%EndSetup/ { print; printing=0 }
- /^%%Trailer/ { printing=1 }
- /^%%Page: 50 / { printing=1 }
- /^%%Page: 60 / { lastpage=1 }
- /^%%Page: 75 / { printing=1; lastpage=1 }
- /^%%Page: 78 / { printing=1; lastpage=1 }
- /^%%Page: 85 / { printing=1; lastpage=1 }
- /^%%Page/ { if(lastpage) printing=0 }
- printing==1 { print }' documents | lp
-
- > The printer is an Apple LaserWriter 2.
- > We use "/usr/bin/lp". Is there some software for extracting only these
- > pages from the document ?
-
- Yes. It basically does the operation listed above.
- --
- Peter da Silva `-_-'
- Ferranti International Controls Corporation 'U`
- Sugar Land, TX 77487-5012 USA
- +1 713 274 5180 "Zure otsoa besarkatu al duzu gaur?"
-