Article View: comp.lang.postscript
Article #1976Re: Help requested from postscript *Gurus*
From: Kevin Grover
Date: Wed, 26 Aug 1992 18:03
Date: Wed, 26 Aug 1992 18:03
56 lines
2388 bytes
2388 bytes
In article <1992Aug25.222652.2046@bnr.ca>, arorav@bnr.ca (Vikas Arora) writes:
) I have a postscript file which contains information
) about various graphical objects. The whole printout of this
) file goes into many pages <something like a poster>. Is
) there a way to *scale* it down to a single page printout without really
) worrying about the visibility of the objects.
)
There is, but it assumes you know a little about the file. First, you
must know have many 'pieces' there are (i.e. how many pages when
printed normaly). Second, you must be able to figure out a proper
scale so that each piece will fit correctly onto 1 sheet of paper.
The trick is to redefine the showpage command
% -----
/Tdict 5 dict def % Place to store stuff
Tdict begin
/oldshowpage /showpage load def % saves old showpage (in Tdict)
/pgcount 0 def % Keep track of number of pages
end
/showpage {
Tdict begin
/pgcount pgcount 1 add def % Bump page count by 1
pgcount LASTPG ge {
oldshowpage
} if
end
% NEED CODE HERE TO POSSITION NEXT PAGE
}
% ---------
Insert the above code infornt of the PS file, and add a scale command
to will allow all of the pages to fit on a single page.
i.e.
.5 .5 scale % will allow 4 pages per physical page.
In the code above LASTPG should be replaced by the number of 'pieces'
in the poster. And the comment "% NEED CODE HERE..." needs to be
modified to set a new origin based on the order of the pieces are
printed in. You will need to "gsave/grestore" combo in this code
somewhere to make it all work.
--------------------------------------------------------------------------
Kevin O. Grover | UNLV Computer Science and Electrical Engineering
grover@isri.unlv.edu | ISRI - Information Science Research Institute
CServe: [73627,1677] | 4505 S. Maryland Parkway, Las Vegas NV 89154-1017
Technical Details
Message-ID:
<1992Aug26.180305.1406@unlv.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!nevada.edu!jimi!mighty-joe.isri.unlv.edu!groverReferences:
<1992Aug25.222652.2046@bnr.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript Path: arc1-ca.pugleaf.net!sparky!uunet!nevada.edu!jimi!mighty-joe.isri.unlv.edu!grover From: grover@mighty-joe.isri.unlv.edu (Kevin Grover) Subject: Re: Help requested from postscript *Gurus* Message-ID: <1992Aug26.180305.1406@unlv.edu> Sender: news@unlv.edu (News User) Reply-To: grover@isri.unlv.edu Organization: Information Science Research Institute (UNLV-ISRI) References: <1992Aug25.222652.2046@bnr.ca> Date: Wed, 26 Aug 92 18:03:05 GMT Lines: 56