🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #475

Re: Printing n1-n2 pages of a file?

#475
From: Shad Todd
Date: Sat, 11 Apr 1992 17:58
26 lines
1449 bytes
Appending this to the beginning of a ps file should work.
-shad
shtodd@vassar.edu
%Note: Append this file to the beginning of any
%      PostScript file to print selected pages.
%      This takes advantage of a bug in PostScript
%      that may (or may not be) fixed anytime soon.
%      Please send improvements to shtodd@vassar.edu. Thanks.

%1 2		%Uncomment to print selected (startpage, endpage)

/selbool false def count 2 eq{/endpage exch def /startpage exch def
/selbool true def}if
/origshowpage /showpage load def /pagenum (000) def
/showpage
	{userdict begin /x 0 def /y 0 def
	/page pagenum cvi 1 add =string cvs def
	/i pagenum cvi 1 add def
	page length 3 exch sub{pagenum x (0) 0 get put /x x 1 add def}repeat
	page length{pagenum x page y get put /x x 1 add def /y y 1 add def}
         repeat
	selbool{i startpage ge i endpage le and {origshowpage}
	{erasepage}ifelse}{origshowpage}ifelse
	end}def
%%End
Technical Details
Message-ID: <1992Apr11.175829.8599@usenet.ins.cwru.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bf148

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bf148
From: bf148@cleveland.Freenet.Edu (Shad Todd)
Newsgroups: comp.lang.postscript
Subject: Re: Printing n1-n2 pages of a file?
Message-ID: <1992Apr11.175829.8599@usenet.ins.cwru.edu>
Date: 11 Apr 92 17:58:29 GMT
Article-I.D.: usenet.1992Apr11.175829.8599
Sender: news@usenet.ins.cwru.edu
Organization: Case Western Reserve University, Cleveland, Ohio, (USA)
Lines: 27
Nntp-Posting-Host: cwns1.ins.cwru.edu