[comp.lang.postscript] 2 logical pages per physical, again...

tarrall@news.Colorado.EDU (Counselor Neon) (05/27/91)

OK - here's the deal.  I have 3000 pairs of files to print.  Each of these files takes up one normal logical page.  Our printer 
(PrintStation 20) and Ultrix lpr command allow me to automagically print two
pages on the same side of a physical sheet.  Basically, each logical page is
rotated 90 deg. and scaled down.  With (say) two logical pages of text, (in two separate files in this case) this produces one physical sheet.  When the 
sheet is held long axis up, the text of page one goes top to bottom on the
left side of the page, and page two goes on the right, so the page looks like :__________________
| text   |  text  |
| page   |  page  |
| one    |  two   |
-------------------
Now, I have two files that are normally printed in landscape mode.  I want them
to come out like :
-----------
| page one|
|         |
|         |
|         |
-----------
| page two|
|         |
|         |
|         |
-----------
on one physical sheet of paper.  They do come out that way, with one problem.
Page one is upside-down, so that the tops of both logical pages appear in the
*center* of the physical page. 
  The files : one is plain ascii text; I have been using enscript -r to make
it into a landscape-oriented PS file.  The other file is an IDL-generated 
graph which is already in PS form.  My problem is definitely caused by differ-
ences between the two files; if I print two IDL graphs on the same page they
come out with the proper orientation.  Does anyone have any suggestions as to
how I can get one of these files (doesn't matter which) rotated so it will come
out properly?
							-Robert.-

  

glenn@heaven.woodside.ca.us (Glenn Reid) (05/27/91)

Counselor Neon writes
> Now, I have two files that are normally printed in landscape mode.  I want  
them
> to come out like :
> on one physical sheet of paper.  They do come out that way, with one problem.
> Page one is upside-down, so that the tops of both logical pages appear in the
> *center* of the physical page. 
>   The files : one is plain ascii text; I have been using enscript -r to make
> it into a landscape-oriented PS file.  The other file is an IDL-generated 
> graph which is already in PS form.

I think you can fix this problem by editing the enscript prologue file
that should be in /usr/lib/transcript/enscript.pro.  There is a line in
there that looks like this:

	/Landscape{90 rotate 0 -15840 translate}def

You should change it to look like this:

	/Landscape{-90 rotate -15840 -3600 translate}def

Note: enscript uses a strange coordinate system and in fact places the
origin off the page when in Landscape mode, but at least experimentally
the above code seems to do the trick.  You might need to hack the
translation components if it isn't working for you.  As a reference,
the number -15840 is exactly 792 points (the long edge of an 8.5"x11"
page) multiplied by the enscript scale factor of .05.  The value -3600
is (792-612) / .05 for obscure reasons (the aforementioned off-page
condition).

For "normal" PostScript code on a letter-sized page, you would see
either

	90 rotate 0 -612 translate
or
	-90 rotate -792 0 translate

to get you into Landscape mode in either orientation.

Good luck.

--
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		NeXT/PostScript developers
 ..{adobe,next}!heaven!glenn		415-326-2974 (NeXTfax 326-2977)