Multiple Postscript Images on One Page

This is an htmlized version of what Eric Howard wrote up while typesetting his PhD thesis. Any errors are either his or ours, and if you can't find us, we aren't responsible! To put multiple color postscript files together as a single document:
  1. Convert to postscript using xv, and save at 50% of the size of the original.

  2. cat file2.ps >> file1.ps

  3. Headers will include (but not be limited to the following lines (don't change any of the other header lines unless mentioned below):

        %!PS-Adobe-2.0 EPSF-2.0
        %%Title: /eod0/thesis/monr2pics/fig3.1.ps
        %%Creator: XV Version 3.10a  Rev: 12/29/94  -  by John Bradley
        %%Pages: 1
        %%DocumentFonts:
        %%EndComments
        %%EndProlog
    
        %%Page: 1 1
    
    
        % lower left corner
        0 512 translate
    
        % size of image (on paper, in 1/72inch coords)
        256.03200 256.03200 scale
    
    
        512 512 8                       % dimensions of data
        [512 0 0 -512 0 512]            % mapping matrix
        {currentfile pix readhexstring pop}
        false 3 colorimage
              
  4. On the combined image search on `showpage'.

  5. Delete the lines:

        showpage
    
        % stop using temporary dictionary
        end
    
        % restore original state
        origstate restore
    
        %%Trailer
              

    in the middle of the combined image, pertaining to the first image (file1.ps), but not the ones at the end of the file, pertaining to the second file (file2.ps).

  6. In the second header (the one that goes with file2.ps), remove the lines starting with `%!PS-Adobe' and ending with `%%Page 1 1'.

  7. In the second header remove the lines that include the scale factor:

        % size of image (on paper, in 1/72inch coords)
        256.03200 256.03200 scale
              
  8. In the second header change the `translate' line from:

        % lower left corner
        ### ### translate
              

    to

        % lower left corner
        0 0 translate
              
  9. In the second header change the mapping matrix line to reflect where you want the second image:

        upper left:  [512 0 0 -512 0 512]               % mapping matrix
        upper right: [512 0 0 -512 -512 512]            % mapping matrix
        lower left:  [512 0 0 -512 0 0]                 % mapping matrix
        lower right: [512 0 0 -512 -512 0]              % mapping matrix
              

    Or whatever variation works.

  10. You will also need to change things appropriately in the first header to put your image at upper left or whatever by editing the `translate' line in the first header to be:

        0 512 translate
              

    Note that all of these numbers may need to be scaled to get them to work with the images you are using.


© J Kevin McFadden
Last modified: Thu Aug 8 10:16:47 EDT