[comp.lang.postscript] Help! A Simple Question...

jma7759@cec1.wustl.edu (James Michael Anderson) (03/20/91)

Ok, so here's the story: I have a graphing package (PLOT2) that has
produced a Postscript file as output.  When I print the file, it
comes out in landscape mode and fills the length of the 11" paper.
I want to print the graph out in portrait mode and I want it to
be no wider than 6 1/2 inches.  My problem is that I do not read
Postscript and I am unsure of what I have to change in order to
get what I want!

I have been able to figure out a little bit of the language.  Listed
below is a shortened version of my file.  I know that if I change the
"90 rotate" line to "0 rotate" and the line that reads:
             "0 -8.5 72 mul translate"
can be changed to:
             "0 0 72 mul translate"
which will cause the figure to be printed in portrait mode; however,
its still to wide!  What else do I have to do?


============ Postscript file listing follows! =====================

%!
%%Title: stdin
%%Creator: f2ps
%%CreationDate: Tue Mar 19 18:43:26 1991
%%For: ja@wucec1 (Jim Anderson,,,)
%%Pages: 1
%%BoundingBox: 72 252 540 540
%%EndComments
/$F2psDict 32 dict def $F2psDict begin $F2psDict /mtrx matrix put
 end /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def /$F2psEnd {$F2psEnteredState restore end} def
%%EndProlog
$F2psBegin
1 setlinecap
 1 setlinejoin
90 rotate
 0 -8.5 72 mul translate
72 1000 div dup scale
10 setlinewidth
10 setlinewidth
2657 2165 moveto 2742 2165 lineto stroke
%% (rest of the figure is described here)
showpage
$F2psEnd

============ End of Postscript file listing =====================

Thanks in advance for any assistance!
--------------------------------------------------------------------------
        J MM    MM AAAA     | 
        J M M  M M AAAA     |    "I'm not bad, I'm just coded that way!"
     JJJJ M  MM  M A  A     |    Jim Anderson:   jma7759@wucec1.wustl.edu

brown@vidiot.UUCP (Vidiot) (03/21/91)

In article <1991Mar20.031537.22872@cec1.wustl.edu> jma7759@cec1.wustl.edu (James Michael Anderson) writes:
<
<Ok, so here's the story: I have a graphing package (PLOT2) that has
<produced a Postscript file as output.  When I print the file, it
<comes out in landscape mode and fills the length of the 11" paper.
<I want to print the graph out in portrait mode and I want it to
<be no wider than 6 1/2 inches.  My problem is that I do not read
<Postscript and I am unsure of what I have to change in order to
<get what I want!
<
<I have been able to figure out a little bit of the language.  Listed
<below is a shortened version of my file.  I know that if I change the
<"90 rotate" line to "0 rotate" and the line that reads:
<             "0 -8.5 72 mul translate"
<can be changed to:
<             "0 0 72 mul translate"
<which will cause the figure to be printed in portrait mode; however,
<its still to wide!  What else do I have to do?

The scale operation (72 1000 div dup scale) needs to be changed as well.
Try doing: 72 1000 div .619 mul dup scale

This will take 10.5 inches and scale it to 6.5 inches.  Since you didn't
include the complete PostScript, you will have to play with the .619.  Use
a larger number to make it wider, and smaller to make it narrower.
-- 
      harvard\     att!nicmad\          spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot  ucbvax!uwvax..........!astroatc!vidiot!brown
      rutgers/  decvax!nicmad/ INTERNET:vidiot!brown%astroatc@spool.cs.wisc.edu

grover@hammond.cs.unlv.edu (Kevin Grover) (03/21/91)

In article <1991Mar20.031537.22872@cec1.wustl.edu>, jma7759@cec1.wustl.edu (James Michael Anderson) writes:

[ Question about printing wide file smaller ]

) 72 1000 div dup scale

This is the line to look at.  It sets the scale to 72/1000 72/1000 (because the
dup duplicates the result of 72 1000 div.)   Since, postscript does 72 points
per inch by default, this places 1000 points per inch (I think???).

Anyway, make the 1000 larger and the scale will be smaller (and thus more should
fit on the page.)

NOTE:	This a quick answer, and I did not test it.  If it does not work,
	it should at least help you along in the right direction.

-- 
  +-------------------------------------------------+----------------------+
  | Kevin Grover             UNLV Computer Science  |     Home of the      |
  | grover@cs.unlv.edu       Las Vegas, Nevada      |    Running REBELS    |
  +-------------------------------------------------+----------------------+