[comp.lang.postscript] Making Multipage Posters

cramer@optilink.UUCP (Clayton Cramer) (09/18/90)

Is there a way to take a PostScript drawing, and enlarge it so instead
of printing on one page, it prints on several?  Obviously, the margin
areas can't be printed, but if you had a way to scale up a PostScript
drawing so that the upper left quadrant went on page 1, upper right
quadrant on page 2, lower left on page 3, lower right on page 4, it
would be possible to build (with a little tape and carefully 
overlapping) a 17" x 22" poster.

I can picture the general mechanism -- use of the translate and
scale operators to enlarge and move the four parts of the described 
page, but I suspect that someone has already done this trick in a 
general way that works with any well-behaved PostScript drawing.
-- 
Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer
Crime control, Los Angeles style: mandatory Rolex registration, five day
waiting period for used Rolex sales.
You must be kidding!  No company would hold opinions like mine!

toms@fcs260c2.ncifcrf.gov (Tom Schneider) (09/19/90)

In article <4471@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes:
>
>Is there a way to take a PostScript drawing, and enlarge it so instead
>of printing on one page, it prints on several?

I just did this last week!  It prints the same thing three times
in a series of pages.  After each page the coordinate system is shifted
so that more of the display appears.  You will have to futz around with
it to get the overlaps ok, but cutting and joining is easy.  You could
add loops to cover a rectangular area.  If you generalize this, please
post for everybody!

- snip here - snip here - snip here - snip here - snip here - snip here
erasepage

90 rotate
2 2 scale

/shift { % shift to next pannel
-370 0 translate
% 0 -50 translate % slip down (only for NEWS testing)
 } def

/dopage {
erasepage
gsave
  /Helvetica-Bold findfont 100 scalefont setfont
  gsave
    10 -200 translate
    0 0 moveto
    1 2.1 scale
    (SEQUENCE LOGOS:) show
  grestore

  /Helvetica-Bold findfont 50 scalefont setfont
  gsave
    10 -270 translate 0 0 moveto
    (A New Way to Display Consensus Sequences) show
  grestore

  showpage
grestore
shift
} def

dopage
dopage
dopage
- snip here - snip here - snip here - snip here - snip here - snip here

  Tom Schneider
  National Cancer Institute
  Laboratory of Mathematical Biology
  Frederick, Maryland  21702-1201
  toms@ncifcrf.gov

jmd@franklin.ee.umr.edu (Jim Dumser) (09/19/90)

In article <4471@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes:
>
>Is there a way to take a PostScript drawing, and enlarge it so instead
>of printing on one page, it prints on several?

The blue book (_Tutorial and Cookbook_) has a routine called printposter (pp
183 - 185).  It assumes you have a "full scale" drawing, but if you already
have a drawing, you could easily fake that with a scale (3 3 scale will make
a single page drawing into a 3x3 page drawing).

Jim

+-------------------------------------------------------+
|  The fear of the Lord is the beginning of knowledge,  |
| but fools despise wisdom and discipline. Proverbs 1:7 |
|-------------------------------------------------------|
|    Internet: jmd@ee.umr.edu     |  M S - D O S . . .  |
|    UUCP: ...uunet!umree!jmd     |    Just say "NO!"   |
+-------------------------------------------------------+

Here's the code:
---- cut here ----
%!
/printposter
  { /rows exch def
    /columns exch def
    /bigpictureproc exch def
    newpath
      leftmargin botmargin moveto
      0 pageheight rlineto
      pagewidth 0 rlineto
      0 pageheight neg rlineto
    closepath clip
    leftmargin botmargin translate
    0 1 rows 1 sub
      { /rowcount exch def
        0 1 columns 1 sub
          { /colcount exch def
            gsave
              pagewidth colcount mul neg
                pageheight rowcount mul neg
                translate
              bigpictureproc
              gsave showpage grestore
            grestore
          } for
      } for
  } def

/inch {72 mul} def

/leftmargin .5 inch def
/botmargin .25 inch def
/pagewidth 7.5 inch def
/pageheigth 10 inch def

/poster
  { gsave
      3 3 scale
%
% Insert your single page drawing here
%
    grestore
  } def

{poster} 3 3 printposter