Printing two ps files on one page 
Author Message
 Printing two ps files on one page


Quote:

>>Hi,
>>Anyone know how to print two landscape postscript files on one
>>page. I generated those files using grap| pic| troff | dpost.

>Try inserting the statement

>gsave

>at the top of the combined file.
>find the 'showpage' between the first and second page and remove
>it.  Put 'grestore' in its place.  That should combine the
>two images.  But be aware that anything that overlays first image
>is going to wipe it out altogether.

The suggested changes would slap one image on top of the other in exactly the
same location.  If that's what you want, ok.  If you're after 2-up printing,
you have to do a little more work.  

Go ahead and insert "gsave" as suggested above.  Add, immediately after,

90 rotate                     #rotate to portrait
-376 0 translate              #move the origin to the middle of the left margin
.5 .5 scale                   #shrink the image by 1/2 in two dimensions

Then remove the showpage as noted above, and add

grestore                #restore the original graphics state
gsave                   #save the graphics state again
90 rotate               #rotate to portrait
-792 0 translate        #move the origin to the lower left corner
.5 .5 scale             #shrink the image

And then, at the end of the job, locate "showpage" and preceed it with

grestore

I THINK this will work.  Any experienced postscript programmers out there
who want to correct my code or make improvements, I'm wide open for
suggestions.  Please.

/phil weingart
QMS Customer Technical Support



Fri, 25 Mar 1994 22:37:49 GMT  
 Printing two ps files on one page

|>

|> >>Hi,
|> >>Anyone know how to print two landscape postscript files on one
|> >>page. I generated those files using grap| pic| troff | dpost.
|> >
|> >Try inserting the statement
|> >
   [ stuff deleted ]

|> grestore                #restore the original graphics state
|> gsave                   #save the graphics state again
|> 90 rotate               #rotate to portrait
|> -792 0 translate        #move the origin to the lower left corner
|> .5 .5 scale             #shrink the image
|>
|> And then, at the end of the job, locate "showpage" and preceed it
with
|>
|> grestore
|>
|> I THINK this will work.  Any experienced postscript programmers out
there
|> who want to correct my code or make improvements, I'm wide open for
|> suggestions.  Please.
|>
|> /phil weingart
|> QMS Customer Technical Support

 That's ok, up to the scaling! If you put two pages on one page, it must
be scaled
 with a factor sqrt(1/2), not 1/2.

 BTW, it would be better to redefine the showpage - operator to do the
above
 rotations, scalings, etc. and put the original showpage at the end of
the file.
 Something similar (showpage is simply redefined to nothing!) I have
used to make
 a simple shell-script which puts  together PS-Files and prints 16 per
page to
 have a rough sketch of the files.
 If someone has a better script which handles also other scalings ( 2up,
4up, etc.)
 and contains the above redefined showpage-operator, please let me
know!

 If someone is interested in the script, let me know, too. I will mail
it then.

-guido

--
-----------------------------------------------------

Institut fuer Theoretische Physik, TU Berlin, Germany
-----------------------------------------------------



Sat, 26 Mar 1994 20:17:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie- How to Print two ps files on one page (windows 95)

2. Re; Printing two ps files on one page

3. Merge Two Single Page PS documents into one Single Page PS Document

4. Trying to combine two postscript print files into one duplex page

5. : Utils for putting two PS files on one Page

6. how to print two pages into one page

7. Multiple PS files to one, one-page PS

8. splitting one big (~500 pages) ps file into small-ones - with delimiters in files

9. Printing two pages on one sheet

10. Summary: Printing two pages on one

11. Q: Using ghostview to print two pages on one

12. Printing two pages on one

 

 
Powered by phpBB® Forum Software