🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.postscript
3 messages
3 total messages Started by Vikas Arora Tue, 25 Aug 1992 22:26
Help requested from postscript *Gurus*
#1963
Author: Vikas Arora
Date: Tue, 25 Aug 1992 22:26
12 lines
827 bytes
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.

Any help/suggestions would be of great use.

Thanks,

Vikas
Software Engineering Centre
Re: Help requested from postscript *Gurus*
#1976
Author: Kevin Grover
Date: Wed, 26 Aug 1992 18:03
56 lines
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
Re: Help requested from postscript *Gurus*
#1977
Author: Kevin Grover
Date: Wed, 26 Aug 1992 19:26
21 lines
1161 bytes
In article <1992Aug26.180305.1406@unlv.edu>, grover@mighty-joe.isri.unlv.edu (Kevin Grover) writes:

) /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
) }

Opps, make that last line

} bind def

--------------------------------------------------------------------------
 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads