home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / postscri / 6082 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.lang.postscript
  2. Path: sparky!uunet!psinntp!ficc!peter
  3. From: peter@ferranti.com (peter da silva)
  4. Subject: Re: printing a range of pages from a postscript file
  5. Message-ID: <id.ES1W.3M2@ferranti.com>
  6. Organization: Xenix Support, FICC
  7. References: <1h7flvINNjc1@tamsun.tamu.edu>
  8. Date: Wed, 23 Dec 1992 00:48:09 GMT
  9. Lines: 28
  10.  
  11. In article <1h7flvINNjc1@tamsun.tamu.edu> vamsee@abgen.tamu.edu (Vamsee Lakamsani) writes:
  12. > I have an 80 page postscript document and I need only pages 50-60,75,
  13. > 78 and 80 (this is just a silly example). Is there someway that I can tell
  14. > the printer to print only these pages?
  15.  
  16. Something like:
  17.  
  18. awk 'BEGIN { printing=1 }
  19. /^%%EndSetup/ { print; printing=0 }
  20. /^%%Trailer/ { printing=1 }
  21. /^%%Page: 50 / { printing=1 }
  22. /^%%Page: 60 / { lastpage=1 }
  23. /^%%Page: 75 / { printing=1; lastpage=1 }
  24. /^%%Page: 78 / { printing=1; lastpage=1 }
  25. /^%%Page: 85 / { printing=1; lastpage=1 }
  26. /^%%Page/ { if(lastpage) printing=0 }
  27. printing==1 { print }' documents | lp
  28.  
  29. > The printer is an Apple LaserWriter 2.
  30. > We use "/usr/bin/lp". Is there some software for extracting only these 
  31. > pages from the document ?
  32.  
  33. Yes. It basically does the operation listed above.
  34. -- 
  35. Peter da Silva                                            `-_-'
  36. Ferranti International Controls Corporation                'U` 
  37. Sugar Land, TX  77487-5012 USA
  38. +1 713 274 5180                            "Zure otsoa besarkatu al duzu gaur?"
  39.