% name of textfile: p10.autoaddressing labels, envelopes, letters % .... % ========= % This file requires the previous download of gonzo.psl % available from https://www.tinaja.com/pssamp1.shtml % Make sure the following line agrees with your own gonzo.psl location (C:/Users/don/Desktop/gonzo/gonzo.psl) 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: p13a auto-addressing envelopes % .... % 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % (M) ENVELOPE AUTO-ADDRESSER % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This example creates and then auto-addresses a business envelope % Once again, use the Gonzo utilities for best results. % /striplines takes a multi-line string, extracts each individual line string, % and then executes stripproc for each line. Useful for simple addressing % and custom form filling-in. /striplines {gsave {(\n) search {exch pop stripproc} {stripproc exit} ifelse} loop grestore} def % Some stripproc is needed by striplines. This stripproc does a left % justified address, given the x and y position on the stack /stripproc {currentpoint 3 -1 roll show yinc sub moveto } def % And this sits in for your logo and return address... /returnaddress {gsave (Zeus Zimmerman 9999 Zoraster Way Zion, UT 9999) striplines grestore} def /yinc 14 def % spacing of both addresses /font1 {/Bookman-Demi findfont [10 0 0 10 0 0] makefont} def /font2 {/Bookman-Demi findfont [12 0 0 12 0 0] makefont} def /repeatproc { srfile length 1 sub runnum lt {/quickexit true def exit} if 20 280 moveto % positions return address font1 setfont returnaddress 270 135 moveto % positions main address font2 setfont srfile runnum get striplines } def /srfile [ (Aaron A. Aardvark 111 Ardmore Avenue Artesia, AZ 11111) (Boyd B. Benson 222 Baker Boulevard Bismark, BC 2B2 2B2) (Clyde C. Calhoun 333 Cumberland Circle Chambers, CA 33333) ] def /customdata true def (busenvelope) stepandrepeat % eof