% name of textfile: p10.autoaddressing labels, envelopes, letters % .... % ========= % This file requires the previous download of gonzo.ps % available from https://www.tinaja.com/pssamp1.shtml % Make sure the following line agrees with your gonzo.ps location % Use DOUBLE SLASHES anytime you want a single slash in a PS string. (C:\\windows\\desktop\\gonzo\\gonzo.ps) run % use internal gonzo % ========== gutility begin % open some dictionaries printerror % print errors to paper nuisance begin gonzo begin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % GURU GONZO STEP AND REPEAT UTILITIES: % ===================================== % These tools can be used any time you want identical or slightly % changing repeating artwork. Important uses include business cards, % disk labels, awards, bumperstickers, notices, reader service cards, % custom forms, shipping labels, tickets, videotape spline stickers, etc... % Portrait or landscape modes are supported. % Provisions are included for autonumbering, crop ticks, and for auto % extracting custom information from a name or proc file. When using % custom info, the routines are smart enough to handle partial sheets. % Custom data can also be placed in variable form positions. % The same routines are easily used for autoaddressing and custom % business letters, certificates, and awards. % An array entry must first be made into the stepnrptparams dictionary % that decides how many and where the repeats are to appear. Dozens % of patterns are already predefined. % The format for a step and repeat entry is [ #horizrpts #vertrpts % hspacing vspacing hstart vstart ticklen useticks? landscape?] % Horizontal and vertical are defined AFTER selecting portrait or % landscape. Parameters (in points or true/false) are as follows... % % #horizrpts - times proc repeats in horizontal direction % #vertrpts - times proc repeats in vertical direction % hspacing - horizontal proc repeat spacing % vspacing - vertical proc repeat spacing % hstart - horizontal offset of first proc % vstart - vertical offset of first proc % ticklen - length of cropping ticks when and if used % useticks? - show the ticks true/false boolean % landscape - landscape orientation true/false boolean % Note that step and repeat patterns are somewhat machine specific % when using narrower sheets or machines that demand wide margins. % The CX engines align flush right on a manual feed, while the SX % align on center. Watch this detail. % Here are some predefined step-and-repeat patterns. You will want to % add your own. And/or alter these to suit your choice of forms. /stepnrptparams 40 dict def stepnrptparams begin /admitonetick [5 9 150 60 25 25 10 true true] def % 45 tickets /babybumper [2 10 270 72 40 30 20 true false] def % 20 stickers /badgeaminit [2 3 220 220 90 60 250 false false] def % 6 badges /bigbumpstick [1 3 792 205 0 0 40 true true] def % 3 bumperstickers /buscard [3 4 256 143 12 20 20 true true] def % 12 buscards /busenvelope [1 1 685 305 0 150 20 true true] def % 1 envelope /eightlabel [2 4 306 198 0 0 50 true false] def % 1/8 page /fulllandpage [1 1 0 0 20 20 50 false true] def % entire landscape page /fullportpage [1 1 0 0 20 20 50 false false] def % entire portrait page /lilbumpstick [1 5 610 150 0 20 60 true false] def % 5 blumperstickers /quadsplit [2 2 396 306 0 0 50 true true] def % 1/4 page /readerserv [12 25 25 -15 120 450 0 false false] def % 300 RS numabers /shiplabel [1 4 290 180 160 65 40 true false] def % 4 custom labels /sixlabel [2 3 306 264 0 0 50 true false] def % 1/6 page /stdplabel [1 11 254 74 185 5 20 true false] def % 11 stock dp labels /tenlabel [2 5 305 144 0 45 50 true false] def % 1/10 page /videospline [1 13 424 60.3 80 34 0 false false] def % 13 VHS splines /3.5disklabel [2 3 216 226 100 60 20 false false] def % 6 disk labels 3.5 /5.25disklabel [1 7 316 110 275 35 0 false false] def % 7 disk labels 5.25 end % /setrepeatparams is a working tool that extracts the selected repeat % values from an entry in stepnrptparams. /setrepeatparams {cvn stepnrptparams exch get aload pop /landscape1 exch def /ticktrue exch def /ticklen exch def /vertstart exch def /horstart exch def /incvert exch def /inchoriz exch def /numvert exch def /numhoriz exch def} def % /onetick optionally draws a single tick or crop mark, while /drawticks % puts one at each corner of each form /onetick { 0 ticklen 2 div rmoveto 0 ticklen neg rlineto ticklen 2 div neg dup neg rmoveto ticklen 0 rlineto 0 setlinewidth stroke} def /drawticks {gsave ticktrue {0 0 moveto onetick inchoriz 0 moveto onetick 0 incvert moveto onetick inchoriz incvert moveto onetick} if grestore}def % default variables used by stepnrpt /srexitproc {} def % default short exit - don't do it. /numpages 1 def % default number of sheets to print /startnum 0 def % initial ticket number /runnum startnum def % running pointer advances one per repeat /repeatproc {} def % artwork to get repeated default /customdata false def % autopaginate custom data? % /srfile gets used for custom entries. Each entry can be a string or a % proc, but ONLY ONE ENTRY is allowed per final repeat. /srfile [(You) (forgot) (to) (define) (srfile!)] def % default srfile % /calcpages is an optional routine that decides how many pages are % needed ONLY when you are using a custom srfile. This allows early % exits when or if you run out of data. /calcpages {dup cvn stepnrptparams exch get dup 0 get exch 1 get mul cvi srfile length exch div ceiling cvi /numpages exch def} def % This is the main stepandrepeat tool... /stepandrepeat { save /srsnap exch def mark exch /quickexit false def customdata {calcpages} if setrepeatparams numpages {gsave landscape1 {-90 rotate -792 0 translate} if horstart vertstart translate gsave numhoriz {gsave numvert {drawticks save /rptsave1 exch def repeatproc rptsave1 restore /runnum runnum 1 add def 0 incvert translate srexitproc} repeat quickexit {exit} if grestore inchoriz 0 translate} repeat quickexit {exit} if grestore showpage grestore} repeat quickexit {showpage} if cleartomark srsnap restore} def % To force an early exit when you run out of names or reach a given % ticket number, test suitably. Then conditionally make /quickexit % true and exit repeatproc. % Note that an ending showpage is NOT required and should NOT be used. %%%%%%%%%% % name of textfile: p12.autoaddressed form letter % .... % note that gonzo utilities dictionaries were opened before % the stepandrepeat dictionary on the template file - be sure % to append the auto-form letter file to the end of the srtemplate %%%%%%%%%%%%%%%%%%%%%%%%%%%% % (N) AUTO-FORM LETTER %%%%%%%%%%%%%%%%%%%%%%%%%%%% % This sends a form letter to everybody on the address list. Again, % use the Gonzo routines for first rate quality % your letterhead goes here /letterhead {gsave /font0 /Helvetica-Bold [12 0 0 12 0 0] gonzofont 296 730 (|0Your letterhead goes here) cc 1 setlinecap 2 setlinewidth 50 720 moveto 530 0 rlineto stroke grestore} def /font1 /Palatino-Roman 11 gonzofont /font2 /Palatino-Italic 11 gonzofont /font3 /Palatino-Bold 11 gonzofont /font4 /Palatino-BoldItalic 11 gonzofont /date {gsave font1 450 680 (April 22, 1992) cr grestore} def /body { gsave /txtwide 400 def 75 340 (|1This is a |2sample form letter|1 with |3auto-changinging|1 addresses. The body of your form letter goes in this space.) cl grestore} def /signature {gsave 75 250 (|1Sincerely yours, DTP Class, Spring 1992) cl grestore } def /repeatproc { srfile length 1 sub runnum lt {/quickexit true def exit} if letterhead date body signature 200 10 moveto 75 400 srfile runnum get cl } def /srfile [ font1 (Aaron A. Aardvark 111 Ardmore Avenue Artesia, AZ, 11111) (Boyd B. Benson 222 Baker Boulevard Bismark, BB, 22222) (Clyde C. Calhoun 333 Cumberland Circle Chambers, CA, 3333) ] def /runnum 0 def /customdata true def (fullportpage) stepandrepeat % eof