Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!ism780c!jeff From: jeff@ism780c.isc.com (Jeff Copeland) Newsgroups: comp.lang.postscript Subject: Re: Christmas cards Message-ID: <20194@ism780c.isc.com> Date: 8 Dec 88 18:28:52 GMT References: <597@tuck.nott-cs.UUCP> Reply-To: jeff@ism780c.UUCP (Jeff Copeland) Organization: Interactive Systems Corp., Santa Monica CA Lines: 115 In article <597@tuck.nott-cs.UUCP> anw@maths.nott.ac.uk (Dr A. N. Walker) writes: > > We're thinking of doing our Christmas cards on the LW this year. > .... > > As a counter-bargain, here is a script I wrote last year to do >little name-plates for Christmas Dinner. Needs a LW+ with Z-Dingbats, >and it's *very* slow the first time while all the stars get cached (at >least, I assume that's the problem); second pages & re-runs run OK. >Do with it as you will. Starting from the name-plate code, I wrote some PostScript code to do a two-color card, and added some (very simple-minded) code to do inside text. Three pages are printed as camera-ready copy for the front of the card. They are labelled "red", "green" and "green minus red"; the last page is the same as the green page, but with the red stars "dropped out", so that red ink is not printed over green ink. (In practice, paper plate photo-offset printing from 300 dpi laser printed masters may not provide exact enough registration to prevent green/red bleeding.) These are set up for printing on 9 x 6.25 inch stock, which is then folded in half. In the US, this is a standard wedding invitation size, called "6 bar", or just to confuse things, "A6" stock. Envelopes are available to match. This size paper is often sold in American stationary stores in small quantity under the name "paper by the pound". To print in a different size, change the values of xmax and ymax. ============================ cut here ======================== %! % Winter Holiday card. /inch { 72 mul } def % the x and y dimensions of the card /xmax 4.5 inch cvi def /ymax 6.25 inch cvi def % crop marks /CropMarks { .005 inch setlinewidth xmax ymax 1 inch add moveto 0 -.75 inch rlineto stroke xmax 1 inch add ymax moveto -.75 inch 0 rlineto stroke xmax -1 inch moveto 0 .75 inch rlineto stroke xmax 1 inch add 0 moveto -.75 inch 0 rlineto stroke 0 -1 inch moveto 0 .75 inch rlineto stroke -1 inch 0 moveto .75 inch 0 rlineto stroke 0 ymax 1 inch add moveto 0 -.75 inch rlineto stroke -1 inch ymax moveto .75 inch 0 rlineto stroke } def % scale and translate /PageSetup { .75 inch .75 inch translate %% add scaling here to print larger masters, which %% can then be shot down for higher apparent resolution. CropMarks } def % page label /PageLabel { xmax .5 inch add ymax .5 inch add moveto /Helvetica findfont 10 scalefont setfont show } def % random number seed /seed 212695 def /stars [ (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) (k) (A) (B) (C) (D) (E) (F) (G) (H) (I) (J) (K) (L) (M) (N) (O) (P) (Q) (R) (S) (T) (U) (V) (W) (X) (Y) (Z) ] def /nn stars length def /plonk { rand xmax mod rand ymax mod moveto stars rand nn mod get show } def % Do 100 stars of varying sizes /Stars { /ZapfDingbats findfont 14 scalefont setfont 30 { plonk } repeat /ZapfDingbats findfont 16 scalefont setfont 25 { plonk } repeat /ZapfDingbats findfont 20 scalefont setfont 45 { plonk } repeat } def % red set of stars PageSetup seed srand Stars %% red set (red) PageLabel showpage % green set of stars PageSetup Stars %% green set (green) PageLabel copypage % now erase the red set, so there's no overlap 1 setgray seed srand Stars 0 setgray (green minus red) PageLabel showpage % inside text PageSetup (text) PageLabel /Text { moveto show } def /ZapfChancery-MediumItalic findfont 16 scalefont setfont (Wishing you joyous) 1.5 inch 5 inch Text (winter holidays) 1.6 inch 4.75 inch Text (and a wonderful 1989.) 1.7 inch 4.5 inch Text showpage ============================ cut here ========================