🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #5826

Re: printing a range of pages from a postscript file

#5826
From: peter da silva
Date: Wed, 23 Dec 1992 00:48
28 lines
1466 bytes
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?"
Technical Details
Message-ID: <id.ES1W.3M2@ferranti.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!ficc!peter
References: <1h7flvINNjc1@tamsun.tamu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript
Path: arc1-ca.pugleaf.net!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