11 my $libraryname='Copper Mountain Elementary';
13 # Shifts are given in millimeters. Positive numbers move up and to the right.
14 # These variables shift the whole page to account for printer differences.
32 my $barcodewidth=length("$pretext$startnumber")+2;
34 my $bcwidthfactor=8-$barcodewidth/2;
35 print STDERR "$barcodewidth $bcwidthfactor\n";
37 my $width=$rightside-($leftmargin+$rightmargin);
38 my $height=$topside-$topmargin-$botmargin;
43 %%Creator: Willem van Schaik
44 %%CreationDate: aug 1992
46 %%DocumentFonts: Helvetica Code39
47 %%BoundingBox: 0 0 595 842
53 /FontMatrix [0.01 0 0 0.01 0 0] def
54 /FontBBox [0 0 100 100] def
56 /Encoding 256 array def
57 0 1 255 {Encoding exch /.notdef put} for
58 Encoding 32 /barSpace put
59 Encoding 36 /barDollar put
60 Encoding 37 /barPercent put
61 Encoding 42 /barAsterisk put
62 Encoding 43 /barPlus put
63 Encoding 45 /barHyphen put
64 Encoding 46 /barPeriod put
65 Encoding 47 /barSlash put
100 Encoding 89 /barY put
101 Encoding 90 /barZ put
103 /CharProcs 45 dict def
106 /barSpace {0 7 17 17 7 7 7 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
107 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
108 /barDollar {0 7 17 7 17 7 17 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
109 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
110 /barPercent {0 7 7 7 17 7 17 7 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
111 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
112 /barAsterisk {0 7 17 7 7 17 7 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
113 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
114 /barPlus {0 7 17 7 7 7 17 7 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
115 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
116 /barHyphen {0 7 17 7 7 7 7 17 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
117 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
118 /barPeriod {0 17 17 7 7 7 7 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
119 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
120 /barSlash {0 7 17 7 17 7 7 7 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
121 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
122 /bar0 {0 7 7 7 17 17 7 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
123 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
124 /bar1 {0 17 7 7 17 7 7 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
125 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
126 /bar2 {0 7 7 17 17 7 7 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
127 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
128 /bar3 {0 17 7 17 17 7 7 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
129 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
130 /bar4 {0 7 7 7 17 17 7 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
131 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
132 /bar5 {0 17 7 7 17 17 7 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
133 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
134 /bar6 {0 7 7 17 17 17 7 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
135 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
136 /bar7 {0 7 7 7 17 7 7 17 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
137 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
138 /bar8 {0 17 7 7 17 7 7 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
139 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
140 /bar9 {0 7 7 17 17 7 7 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
141 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
142 /barA {0 17 7 7 7 7 17 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
143 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
144 /barB {0 7 7 17 7 7 17 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
145 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
146 /barC {0 17 7 17 7 7 17 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
147 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
148 /barD {0 7 7 7 7 17 17 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
149 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
150 /barE {0 17 7 7 7 17 17 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
151 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
152 /barF {0 7 7 17 7 17 17 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
153 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
154 /barG {0 7 7 7 7 7 17 17 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
155 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
156 /barH {0 17 7 7 7 7 17 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
157 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
158 /barI {0 7 7 17 7 7 17 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
159 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
160 /barJ {0 7 7 7 7 17 17 17 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
161 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
162 /barK {0 17 7 7 7 7 7 7 17 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
163 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
164 /barL {0 7 7 17 7 7 7 7 17 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
165 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
166 /barM {0 17 7 17 7 7 7 7 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
167 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
168 /barN {0 7 7 7 7 17 7 7 17 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
169 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
170 /barO {0 17 7 7 7 17 7 7 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
171 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
172 /barP {0 7 7 17 7 17 7 7 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
173 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
174 /barQ {0 7 7 7 7 7 7 17 17 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
175 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
176 /barR {0 17 7 7 7 7 7 17 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
177 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
178 /barS {0 7 7 17 7 7 7 17 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
179 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
180 /barT {0 7 7 7 7 17 7 17 17 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
181 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
182 /barU {0 17 17 7 7 7 7 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
183 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
184 /barV {0 7 17 17 7 7 7 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
185 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
186 /barW {0 17 17 17 7 7 7 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
187 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
188 /barX {0 7 17 7 7 17 7 7 7 17 newpath 93 0 moveto 5 {dup 0 100 rlineto
189 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
190 /barY {0 17 17 7 7 17 7 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
191 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
192 /barZ {0 7 17 17 7 17 7 7 7 7 newpath 93 0 moveto 5 {dup 0 100 rlineto
193 neg 0 rlineto 0 -100 rlineto closepath add neg 0 rmoveto} repeat fill} def
197 { 100 0 0 0 93 100 setcachedevice
207 /Code39 newfont definefont pop
213 my $number=$startnumber;
214 while ($page<$pages) {
216 for ($i=$leftmargin; $i<$rightside-$rightmargin; $i+=$width/4) {
217 for ($j=$botmargin; $j<$topside-$topmargin-$botmargin; $j+=$height/20) {
228 /Code39 findfont [$bcwidthfactor 0 0 5 0 0] makefont setfont
229 (*$pretext$number*) dup stringwidth pop 2 div neg 0 rmoveto show
230 /Helvetica findfont 1.7 scalefont setfont
232 ($schoolname) dup stringwidth pop 2 div neg 0 rmoveto show
233 /Helvetica findfont 2.3 scalefont setfont
235 ($pretext$number) dup stringwidth pop 2 div neg 0 rmoveto show
249 $shiftx $shifty translate
250 72 25.4 div dup scale
252 /Code39 findfont [4 0 0 5 0 0] makefont setfont
253 /Times-Roman findfont