]>
Commit | Line | Data |
---|---|---|
e9aa6a7d | 1 | %!PS-Adobe-3.0 |
2 | %%BoundingBox: 0 0 612 792 | |
3 | %%Pages: 1 | |
4 | %%LanguageLevel: 1 | |
5 | %%DocumentData: Clean7Bit | |
7bda0d95 | 6 | %%DocumentSuppliedResources: procset testprint/1.2 |
e9aa6a7d | 7 | %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman |
8 | %%Creator: Michael Sweet, Easy Software Products | |
292444b9 | 9 | %%CreationDate: D:20060114093000+0500 |
e9aa6a7d | 10 | %%Title: Test Page |
11 | %%EndComments | |
12 | %%BeginProlog | |
3b0415d8 | 13 | %%BeginResource procset testprint 1.2 0 |
e9aa6a7d | 14 | % |
a4dff202 | 15 | % PostScript test page for the Common UNIX Printing System ("CUPS"). |
e9aa6a7d | 16 | % |
292444b9 | 17 | % Copyright 1993-2006 Easy Software Products |
e9aa6a7d | 18 | % |
2c01f916 | 19 | % These coded instructions, statements, and computer programs are the |
20 | % property of Easy Software Products and are protected by Federal | |
21 | % copyright law. Distribution and use rights are outlined in the file | |
22 | % "LICENSE.txt" which should have been included with this file. If this | |
23 | % file is missing or damaged please contact Easy Software Products | |
24 | % at: | |
25 | % | |
26 | % Attn: CUPS Licensing Information | |
27 | % Easy Software Products | |
28 | % 44141 Airport View Drive, Suite 204 | |
c9d3f842 | 29 | % Hollywood, Maryland 20636 USA |
2c01f916 | 30 | % |
c9d3f842 | 31 | % Voice: (301) 373-9600 |
2c01f916 | 32 | % EMail: cups-info@cups.org |
33 | % WWW: http://www.cups.org | |
e9aa6a7d | 34 | % |
3b0415d8 | 35 | /SEXTANT { % Draw a color wheel sextant... |
36 | % (name) white radius r g b SEXTANT - | |
e9aa6a7d | 37 | % Loop through 100 shades... |
38 | 0 0.010101 0.98 { | |
39 | % Set the color... | |
3b0415d8 | 40 | dup 0.75 le { % Get "white" value |
41 | % Start from black | |
42 | dup 0.75 div % val2 = val / 0.75 | |
43 | ||
44 | 0 index 5 index mul % R = R * val2 | |
45 | 1 index 5 index mul % G = G * val2 | |
46 | 2 index 5 index mul % B = B * val2 | |
47 | ||
48 | 4 -1 roll pop % Discard val2 | |
e9aa6a7d | 49 | } { |
3b0415d8 | 50 | % Fade to white |
51 | dup neg 1 add 4 mul % val2 = (1 - val) * 4 | |
52 | ||
53 | 0 index 5 index mul % R = R * val2 | |
54 | 1 index neg 1 add add % + (1 - val2) | |
55 | 1 index 5 index mul % G = G * val2 | |
56 | 2 index neg 1 add add % + (1 - val2) | |
57 | 2 index 5 index mul % B = B * val2 | |
58 | 3 index neg 1 add add % + (1 - val2) | |
59 | ||
60 | 4 -1 roll pop % Discard val2 | |
e9aa6a7d | 61 | } ifelse |
3b0415d8 | 62 | setrgbcolor % Set the color... |
e9aa6a7d | 63 | |
3b0415d8 | 64 | % Draw the polygon... |
65 | newpath % Start a new path... | |
66 | dup 5 index mul % r1 = radius * val | |
67 | 0 0 3 -1 roll 0 60 arc % Draw the inner arc | |
e9aa6a7d | 68 | |
3b0415d8 | 69 | dup 0.010101 add 5 index mul% r2 = (radius + 0.010101) * val |
70 | 0 0 3 -1 roll 60 0 arcn % Draw the outer arc | |
71 | ||
72 | closepath % Close the path | |
73 | fill % Fill it... | |
74 | ||
75 | pop % Pop value... | |
e9aa6a7d | 76 | } for |
77 | ||
78 | % Draw a line around the polygons... | |
3b0415d8 | 79 | pop pop pop dup % Pop R, G, B, start |
80 | 0 setgray % Black | |
81 | newpath | |
82 | 0 0 moveto % Center | |
83 | 0 0 3 -1 roll 0 60 arc % Arc around octant | |
84 | closepath % Back to center | |
85 | stroke % Stroke it... | |
e9aa6a7d | 86 | |
87 | % Draw the label... | |
3b0415d8 | 88 | dup % Save radius |
89 | dup 30 cos mul % X = radius * cos(30) | |
90 | exch 30 sin mul % Y = radius * sin(30) | |
91 | moveto % Position label | |
92 | ||
e9aa6a7d | 93 | gsave |
3b0415d8 | 94 | 30 rotate % Rotate label |
95 | dup 0.05 mul % Offset to the right | |
96 | exch -0.05 mul % and down... | |
97 | rmoveto % Offset label | |
98 | show % Show label | |
e9aa6a7d | 99 | grestore |
100 | } bind def | |
101 | /CENTER { % Draw centered text | |
102 | % (name) CENTER - | |
103 | dup stringwidth pop % Get the width of the string | |
104 | 0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance | |
105 | show % Show the string | |
106 | } bind def | |
107 | /RIGHT { % Draw right-justified text | |
108 | % (name) RIGHT - | |
109 | dup stringwidth pop % Get the width of the string | |
110 | neg 0 rmoveto % Shift left the entire distance | |
111 | show % Show the string | |
112 | } bind def | |
113 | /NUMBER { % Draw a number | |
114 | % power n NUMBER - | |
115 | 1 index 1 eq { % power == 1? | |
116 | round cvi exch pop % Convert "n" to integer | |
117 | } { | |
118 | 1 index mul round exch div % Truncate extra decimal places | |
119 | } ifelse | |
120 | 100 string cvs show % Convert to a string and show it... | |
121 | } bind def | |
122 | /CUPSLOGO { % Draw the CUPS logo | |
123 | % height CUPSLOGO | |
124 | % Start with a big C... | |
125 | /Helvetica findfont 1 index scalefont setfont | |
126 | 0 setgray | |
127 | 0 0 moveto | |
128 | (C) show | |
129 | ||
130 | % Then "UNIX Printing System" much smaller... | |
131 | /Helvetica-Bold findfont 1 index 9 div scalefont setfont | |
132 | 0.25 mul | |
133 | dup dup 2.0 mul moveto | |
134 | (UNIX) show | |
135 | dup dup 1.6 mul moveto | |
136 | (Printing) show | |
137 | dup 1.2 mul moveto | |
138 | (System) show | |
139 | } bind def | |
140 | /ESPLOGO { % Draw the ESP logo | |
141 | % height ESPLOGO | |
7bda0d95 | 142 | gsave |
143 | 48 div dup scale | |
e9aa6a7d | 144 | |
7bda0d95 | 145 | /Helvetica-Bold findfont 38.2 scalefont setfont |
146 | 0 setgray | |
147 | -3 19.5 moveto (ESP) show | |
e9aa6a7d | 148 | |
7bda0d95 | 149 | /Helvetica-Narrow-Oblique findfont 8.2 scalefont setfont |
150 | 0 2 moveto (Easy Software Products) show | |
e9aa6a7d | 151 | |
7bda0d95 | 152 | 1 -0.01 0 { dup neg 1.0 add setgray 0 11 3 -1 roll 68 mul 4.5 rectfill } for |
e9aa6a7d | 153 | |
7bda0d95 | 154 | 1 0 0 setrgbcolor |
155 | 67.5 11 4.5 4.5 rectfill | |
156 | grestore | |
e9aa6a7d | 157 | } bind def |
158 | %%EndResource | |
159 | %%EndProlog | |
160 | %%Page: 1 1 | |
161 | gsave | |
162 | ||
163 | % Determine the imageable area and device resolution... | |
164 | initclip newpath clippath pathbbox % Get bounding rectangle | |
165 | 72 div /pageTop exch def % Get top margin in inches | |
166 | 72 div /pageRight exch def % Get right margin in inches | |
167 | 72 div /pageBottom exch def % Get bottom margin in inches | |
168 | 72 div /pageLeft exch def % Get left margin in inches | |
169 | ||
170 | 4 setlinewidth % Draw wide lines | |
171 | 0 setgray closepath stroke % Draw a clipping rectangle | |
e9aa6a7d | 172 | |
173 | /pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft | |
174 | /pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom | |
175 | ||
176 | 72 72 dtransform % Get device resolution per inch | |
177 | /yResolution exch abs def % yResolution = abs(yres) | |
178 | /xResolution exch abs def % xResolution = abs(xres) | |
179 | ||
b31caa56 | 180 | % Figure out the sizes of things... |
181 | /wheelSize % size of wheels | |
182 | pageWidth pageHeight lt | |
183 | { pageWidth 9 mul } | |
184 | { pageHeight 7 mul } | |
185 | ifelse def | |
186 | ||
e9aa6a7d | 187 | % Create fonts... |
188 | /bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold | |
b31caa56 | 189 | pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33) |
e9aa6a7d | 190 | |
191 | /mediumFont /Helvetica findfont % mediumFont = Helvetica | |
b31caa56 | 192 | pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5) |
e9aa6a7d | 193 | |
194 | /smallFont /Times-Roman findfont % smallFont = Times-Roman | |
b31caa56 | 195 | pageHeight scalefont def % size = pageHeight (nominally 11) |
e9aa6a7d | 196 | |
3f1835d3 | 197 | % Draw rulers along the edges... |
198 | /CENTIMETER 72 2.54 div def | |
199 | /MILLIMETER 72 25.4 div def | |
200 | ||
56194ec7 | 201 | smallFont setfont % Font |
202 | ||
3f1835d3 | 203 | gsave % Left side inches |
204 | pageLeft 72 mul 0 translate % Offset left edge | |
205 | ||
72c5fd53 | 206 | 1 setlinewidth % Draw normal lines |
56194ec7 | 207 | 72 72 pageTop 72 mul { % Height inches |
208 | dup dup | |
209 | 0 exch moveto 24 0 rlineto stroke % Draw tic mark | |
210 | 24 exch pageHeight sub moveto % Draw number | |
211 | 72 div cvi 10 string cvs RIGHT | |
3f1835d3 | 212 | } for |
213 | ||
72c5fd53 | 214 | 0.5 setlinewidth % Draw thin lines |
56194ec7 | 215 | 18 18 pageTop 72 mul { % 1/4 inches |
216 | 0 exch moveto 15 0 rlineto stroke % Draw tic mark | |
3f1835d3 | 217 | } for |
218 | ||
56194ec7 | 219 | 9 9 pageTop 72 mul { % 1/8 inches |
220 | 0 exch moveto 6 0 rlineto stroke % Draw tic mark | |
3f1835d3 | 221 | } for |
222 | grestore | |
223 | ||
224 | gsave % Bottom inches | |
225 | 0 pageBottom 72 mul translate % Offset bottom edge | |
226 | ||
72c5fd53 | 227 | 1 setlinewidth % Draw normal lines |
56194ec7 | 228 | 72 72 pageRight 72 mul { % Width inches |
229 | dup dup | |
230 | 0 moveto 0 24 rlineto stroke % Draw tic mark | |
231 | 3 add 27 pageHeight sub moveto % Draw number | |
232 | 72 div cvi 10 string cvs show | |
3f1835d3 | 233 | } for |
234 | ||
72c5fd53 | 235 | 0.5 setlinewidth % Draw thin lines |
56194ec7 | 236 | 18 18 pageRight 72 mul { % 1/4 inches |
237 | 0 moveto 0 15 rlineto stroke % Draw tic mark | |
3f1835d3 | 238 | } for |
239 | ||
56194ec7 | 240 | 9 9 pageRight 72 mul { % 1/8 inches |
241 | 0 moveto 0 6 rlineto stroke % Draw tic mark | |
3f1835d3 | 242 | } for |
243 | grestore | |
244 | ||
245 | gsave % Right side centimeters | |
246 | pageRight 72 mul 0 translate % Offset right edge | |
247 | ||
72c5fd53 | 248 | 1 setlinewidth % Draw normal lines |
56194ec7 | 249 | CENTIMETER CENTIMETER |
250 | pageTop 72 mul { % Height centimeters | |
251 | 0 exch moveto -24 0 rlineto stroke% Draw tic mark | |
252 | } for | |
253 | 1 1 pageTop 2.54 mul { % Height labels | |
254 | dup | |
255 | -24 exch CENTIMETER mul | |
256 | pageHeight sub moveto % Draw number | |
257 | cvi 10 string cvs show | |
3f1835d3 | 258 | } for |
259 | ||
72c5fd53 | 260 | 0.5 setlinewidth % Draw thin lines |
56194ec7 | 261 | 0 0.5 CENTIMETER mul |
262 | pageTop 72 mul { % 1/2 centimeters | |
263 | 0 exch moveto -15 0 rlineto stroke% Draw tic mark | |
264 | } for | |
3f1835d3 | 265 | 0 MILLIMETER pageTop 72 mul { % Millimeters |
56194ec7 | 266 | 0 exch moveto -6 0 rlineto stroke % Draw tic mark |
3f1835d3 | 267 | } for |
268 | grestore | |
269 | ||
270 | gsave % Top centimeters | |
271 | 0 pageTop 72 mul translate % Offset top edge | |
272 | ||
72c5fd53 | 273 | 1 setlinewidth % Draw normal lines |
56194ec7 | 274 | CENTIMETER CENTIMETER |
275 | pageRight 72 mul { % Width centimeters | |
276 | 0 moveto 0 -24 rlineto stroke % Draw tic mark | |
277 | } for | |
278 | 1 1 pageRight 2.54 mul { % Width labels | |
279 | dup | |
280 | CENTIMETER mul 3 add -24 moveto % Draw number | |
281 | cvi 10 string cvs show | |
3f1835d3 | 282 | } for |
283 | ||
72c5fd53 | 284 | 0.5 setlinewidth % Draw thin lines |
56194ec7 | 285 | 0 0.5 CENTIMETER mul |
286 | pageRight 72 mul { % 1/2 centimeters | |
287 | 0 moveto 0 -15 rlineto stroke % Draw tic mark | |
288 | } for | |
3f1835d3 | 289 | 0 MILLIMETER pageRight 72 mul { % Millimeters |
56194ec7 | 290 | 0 moveto 0 -6 rlineto stroke % Draw tic mark |
3f1835d3 | 291 | } for |
292 | grestore | |
293 | ||
e9aa6a7d | 294 | % Offset page to account for lower-left margin... |
295 | pageLeft 72 mul | |
296 | pageBottom 72 mul | |
297 | translate | |
298 | ||
3b0415d8 | 299 | % Set text font and color... |
e9aa6a7d | 300 | mediumFont setfont % Font |
301 | 0 setgray % Color | |
72c5fd53 | 302 | 1 setlinewidth % Draw normal lines |
e9aa6a7d | 303 | |
3b0415d8 | 304 | % Draw the color wheel... |
e9aa6a7d | 305 | gsave |
306 | % Position the wheel on the left side... | |
307 | pageWidth 18 mul % x = pageWidth * 1/4 * 72 | |
308 | pageHeight 54 mul % y = pageHeight * 3/4 * 72 | |
309 | translate | |
310 | ||
311 | % Size the wheel... | |
b31caa56 | 312 | wheelSize |
e9aa6a7d | 313 | |
314 | % Draw the colors... | |
3b0415d8 | 315 | dup (C) 3 -1 roll 0 1 1 SEXTANT 60 rotate |
316 | dup (M) 3 -1 roll 1 0 1 SEXTANT 60 rotate | |
317 | dup (Y) 3 -1 roll 1 1 0 SEXTANT 60 rotate | |
318 | dup (R) 3 -1 roll 1 0 0 SEXTANT 60 rotate | |
319 | dup (G) 3 -1 roll 0 1 0 SEXTANT 60 rotate | |
320 | dup (B) 3 -1 roll 0 0 1 SEXTANT 60 rotate | |
321 | ||
322 | pop | |
e9aa6a7d | 323 | grestore |
324 | ||
325 | % Label the color wheel... | |
326 | pageWidth 18 mul % x = pageWidth * 1/4 * 72 | |
56194ec7 | 327 | pageHeight 43 mul % y = pageHeight * 19/32 * 72 |
e9aa6a7d | 328 | moveto % Position the text |
329 | (Color Wheel) CENTER % Show the text centered | |
330 | ||
3b0415d8 | 331 | % Draw the gray ramp... |
332 | gsave | |
333 | % Position the gray ramp in the center... | |
334 | pageWidth 36 mul % x = pageWidth * 1/2 * 72 | |
335 | pageHeight 54 mul % y = pageHeight * 3/4 * 72 | |
336 | wheelSize sub % - wheelSize | |
337 | translate | |
338 | ||
339 | % Loop through 100 shades... | |
340 | 0 0.010101 0.98 { | |
341 | % Set the color... | |
342 | dup setgray % Set the grayscale... | |
343 | ||
344 | % Draw the polygon... | |
345 | newpath % Start a new path... | |
346 | ||
347 | wheelSize -0.2 mul % X = -wheelSize / 5 | |
348 | 1 index 2 mul wheelSize mul % Y = val * 2 * wheelSize | |
349 | moveto % Move there... | |
350 | ||
351 | wheelSize 0.4 mul 0 rlineto % Right side... | |
352 | ||
353 | wheelSize 0.2 mul % X = wheelSize / 5 | |
354 | 1 index 0.010101 add 2 mul wheelSize mul | |
355 | % Y = (val + 0.010101) * 2 * wheelSize | |
356 | lineto % Move there... | |
357 | ||
358 | wheelSize -0.4 mul 0 rlineto % Left side... | |
359 | ||
360 | closepath % Close the path | |
361 | fill % Fill it... | |
362 | ||
363 | pop % Pop value... | |
364 | } for | |
365 | ||
366 | 0 setgray % Black | |
367 | ||
368 | newpath % Start a new path | |
369 | wheelSize -0.2 mul 0 moveto % Bottom left | |
370 | wheelSize 0.4 mul 0 rlineto % Bottom right | |
371 | 0 wheelSize 2 mul rlineto % Upper right | |
372 | wheelSize -0.4 mul 0 rlineto % Upper left | |
373 | closepath % Close the path | |
374 | stroke % Stroke it... | |
375 | ||
376 | 0 wheelSize -0.2 mul moveto % Center bottom for label | |
377 | (K) CENTER % Center K at bottom | |
378 | ||
379 | 0 wheelSize 2.05 mul moveto % Center top for label | |
380 | (W) CENTER % Center W at top | |
381 | grestore | |
382 | ||
383 | % Label the gray ramp... | |
384 | pageWidth 36 mul % x = pageWidth * 1/2 * 72 | |
56194ec7 | 385 | pageHeight 43 mul % y = pageHeight * 19/32 * 72 |
3b0415d8 | 386 | moveto % Position the text |
387 | (Gray Ramp) CENTER % Show the text centered | |
388 | ||
389 | ||
e9aa6a7d | 390 | % Draw radial lines... |
391 | gsave | |
392 | 0 setlinewidth % 1 pixel lines | |
393 | ||
394 | % Position the lines on the left side... | |
395 | pageWidth 54 mul % x = pageWidth * 3/4 * 72 | |
396 | pageHeight 54 mul % y = pageHeight * 3/4 * 72 | |
397 | translate | |
398 | ||
399 | % Size the wheel... | |
b31caa56 | 400 | wheelSize |
e9aa6a7d | 401 | |
402 | % Loop at 1 degree increments | |
403 | 0 1 359 { | |
404 | pop % Discard angle - not used | |
405 | 0 0 moveto % Start line at the center | |
406 | dup 0 lineto % Draw to the radius | |
407 | 1 rotate % Rotate 1 degree | |
408 | } for | |
409 | ||
410 | pop % Discard radius - not needed anymore | |
411 | stroke % Draw lines... | |
412 | ||
413 | grestore | |
414 | ||
415 | % Label the lines... | |
416 | pageWidth 54 mul % x = pageWidth * 3/4 * 72 | |
56194ec7 | 417 | pageHeight 43 mul % y = pageHeight * 19/32 * 72 |
e9aa6a7d | 418 | moveto % Position the text |
419 | (1 Degree Radial Lines) CENTER % Show the text centered | |
420 | ||
421 | % Imageable area... | |
b31caa56 | 422 | pageHeight 15 mul % Height of imageable area |
e9aa6a7d | 423 | |
424 | pageWidth 4.5 mul % x = pageWidth * 1/16 * 72 | |
425 | pageHeight 35.5 mul % y = pageHeight * 1/2 * 72 | |
426 | 2 index sub % y -= height | |
427 | pageWidth 28 mul % width = pageWidth * 1/4 * 72 | |
428 | 3 index % height | |
429 | 0.5 setgray rectfill % Draw a shadow | |
430 | ||
431 | pageWidth 4 mul % x = pageWidth * 1/16 * 72 | |
432 | pageHeight 36 mul % y = pageHeight * 1/2 * 72 | |
433 | 2 index sub % y -= height | |
434 | pageWidth 28 mul % width = pageWidth * 3/8 * 72 | |
435 | 3 index % height | |
436 | 4 copy 1 setgray rectfill % Clear the box to white | |
437 | 0 setgray rectstroke % Draw a black box around it... | |
438 | ||
439 | pop % Discard height | |
440 | ||
441 | % Label the imageable area... | |
442 | pageWidth 4 mul % x = pageWidth * 1/16 * 72 | |
443 | pageHeight 37 mul % y = pageHeight * 1/2 * 72 | |
444 | moveto % Position the text | |
445 | mediumFont setfont % Font | |
446 | (Imageable Area) show % Show the text | |
447 | ||
448 | smallFont setfont % Font | |
449 | pageWidth 14 mul % x = pageWidth * 3/16 * 72 | |
450 | pageHeight 36 mul % y = pageWidth * 1/2 * 72 | |
b31caa56 | 451 | pageHeight -2 mul add % y -= 2 * smallFont height |
e9aa6a7d | 452 | |
453 | % Page Size inches | |
454 | 2 copy moveto % Move to x & y | |
455 | (Page Size: ) RIGHT % Label | |
456 | 100 pageWidth NUMBER % pageWidth | |
457 | (x) show % "x" | |
458 | 100 pageHeight NUMBER % pageHeight | |
459 | (in) show % "in" | |
460 | ||
461 | % Page Size millimeters | |
b31caa56 | 462 | pageHeight sub % Move down... |
e9aa6a7d | 463 | |
464 | 2 copy moveto % Move to x & y | |
465 | 10 pageWidth 25.4 mul NUMBER % pageWidth | |
466 | (x) show % "x" | |
467 | 10 pageHeight 25.4 mul NUMBER % pageHeight | |
468 | (mm) show % "mm" | |
469 | ||
470 | % Lower-left inches | |
b31caa56 | 471 | pageHeight 2 mul sub % Move down... |
e9aa6a7d | 472 | |
473 | 2 copy moveto % Move to x & y | |
474 | (Lower-Left: ) RIGHT % Label | |
475 | 100 pageLeft NUMBER % pageLeft | |
476 | (x) show % "x" | |
477 | 100 pageBottom NUMBER % pageBottom | |
478 | (in) show % "in" | |
479 | ||
480 | % Lower-left millimeters | |
b31caa56 | 481 | pageHeight sub % Move down... |
e9aa6a7d | 482 | |
483 | 2 copy moveto % Move to x & y | |
484 | 10 pageLeft 25.4 mul NUMBER % pageLeft | |
485 | (x) show % "x" | |
486 | 10 pageBottom 25.4 mul NUMBER % pageBottom | |
487 | (mm) show % "mm" | |
488 | ||
489 | % Upper-right inches | |
b31caa56 | 490 | pageHeight 2 mul sub % Move down... |
e9aa6a7d | 491 | |
492 | 2 copy moveto % Move to x & y | |
493 | (Upper-Right: ) RIGHT % Label | |
494 | 100 pageRight NUMBER % pageRight | |
495 | (x) show % "x" | |
496 | 100 pageTop NUMBER % pageTop | |
497 | (in) show % "in" | |
498 | ||
499 | % Upper-right millimeters | |
b31caa56 | 500 | pageHeight sub % Move down... |
e9aa6a7d | 501 | |
502 | 2 copy moveto % Move to x & y | |
503 | 10 pageRight 25.4 mul NUMBER % pageRight | |
504 | (x) show % "x" | |
505 | 10 pageTop 25.4 mul NUMBER % pageTop | |
506 | (mm) show % "mm" | |
507 | ||
508 | % Resolution dots-per-inch | |
b31caa56 | 509 | pageHeight 2 mul sub % Move down... |
e9aa6a7d | 510 | |
511 | 2 copy moveto % Move to x & y | |
512 | (Resolution: ) RIGHT % Label | |
513 | 1 xResolution NUMBER % xResolution | |
514 | (x) show % "x" | |
515 | 1 yResolution NUMBER % yResolution | |
516 | (dpi) show % "dpi" | |
517 | ||
518 | % Resolution dots-per-meter | |
b31caa56 | 519 | pageHeight sub % Move down... |
e9aa6a7d | 520 | |
521 | moveto % Move to x & y | |
522 | 1 xResolution 39.27 mul NUMBER % xResolution | |
523 | (x) show % "x" | |
524 | 1 yResolution 39.27 mul NUMBER % yResolution | |
525 | (dpm) show % "dpm" | |
526 | ||
527 | % Interpreter Information... | |
b31caa56 | 528 | pageHeight 15 mul % Height of interpreter information |
e9aa6a7d | 529 | |
530 | pageWidth 40.5 mul % x = pageWidth * 9/16 * 72 | |
531 | pageHeight 35.5 mul % y = pageHeight * 1/2 * 72 | |
532 | 2 index sub % y -= height | |
533 | pageWidth 28 mul % width = pageWidth * 1/4 * 72 | |
534 | 3 index % height | |
535 | 0.5 setgray rectfill % Draw a shadow | |
536 | ||
537 | pageWidth 40 mul % x = pageWidth * 9/16 * 72 | |
538 | pageHeight 36 mul % y = pageHeight * 1/2 * 72 | |
539 | 2 index sub % y -= height | |
540 | pageWidth 28 mul % width = pageWidth * 3/8 * 72 | |
541 | 3 index % height | |
542 | 4 copy 1 setgray rectfill % Clear the box to white | |
543 | 0 setgray rectstroke % Draw a black box around it... | |
544 | ||
545 | pop % Discard height | |
546 | ||
547 | % Label the interpreter info... | |
548 | pageWidth 40 mul % x = pageWidth * 9/16 * 72 | |
549 | pageHeight 37 mul % y = pageHeight * 1/2 * 72 | |
550 | moveto % Position the text | |
551 | mediumFont setfont % Font | |
552 | (Interpreter Information) show % Show the text | |
553 | ||
554 | smallFont setfont % Font | |
555 | pageWidth 49 mul % x = pageWidth * 11/16 * 72 | |
556 | pageHeight 36 mul % y = pageWidth * 1/2 * 72 | |
b31caa56 | 557 | pageHeight 2 mul sub % y -= 2 * smallFont height |
e9aa6a7d | 558 | |
559 | % Language level | |
560 | 2 copy moveto % Move to x & y | |
561 | (PostScript: ) RIGHT % Label | |
562 | (Level ) show % "Level " | |
563 | 1 languagelevel NUMBER % Language level | |
564 | ||
565 | % Version | |
b31caa56 | 566 | pageHeight 2 mul sub % Move down... |
e9aa6a7d | 567 | 2 copy moveto % Move to x & y |
568 | (Version: ) RIGHT % Label | |
569 | version show % Version | |
570 | ( \() show % " (" | |
571 | 1 revision NUMBER % Revision | |
572 | (\)) show % ")" | |
573 | ||
574 | % Product | |
b31caa56 | 575 | pageHeight 2 mul sub % Move down... |
e9aa6a7d | 576 | 2 copy moveto % Move to x & y |
577 | (Product: ) RIGHT % Label | |
578 | product show % Product name | |
579 | ||
580 | % Serial Number | |
b31caa56 | 581 | pageHeight 2 mul sub % Move down... |
3f1835d3 | 582 | moveto % Move to x & y |
e9aa6a7d | 583 | (Serial #: ) RIGHT % Label |
584 | 1 serialnumber NUMBER % S/N | |
585 | ||
586 | % Draw the label at the top... | |
587 | pageWidth 36 mul % Center of page | |
72c5fd53 | 588 | pageHeight 66 mul % Top of page (11/12ths) |
3f1835d3 | 589 | moveto % Position text |
e9aa6a7d | 590 | bigFont setfont % Font |
591 | (Printer Test Page) CENTER % Show text centered | |
592 | ||
593 | % Draw the copyright notice at the bottom... | |
594 | pageWidth 36 mul % Center of page | |
56194ec7 | 595 | pageHeight 12 mul % Bottom of page |
7bda0d95 | 596 | moveto % Position text |
3b0415d8 | 597 | (Printed Using CUPS v1.2.x) CENTER % Show text centered |
e9aa6a7d | 598 | |
7bda0d95 | 599 | pageWidth 34 mul % Left-center of page |
600 | pageHeight 8 mul % Move down... | |
e9aa6a7d | 601 | 2 copy moveto % Position text |
602 | smallFont setfont % Font | |
292444b9 | 603 | (Copyright 1993-2006 Easy Software Products, All Rights Reserved.) CENTER |
b31caa56 | 604 | pageHeight sub % Move down... |
e9aa6a7d | 605 | 2 copy moveto % Position text |
7bda0d95 | 606 | (CUPS, and the CUPS logo are the trademark property of Easy Software Products,) CENTER |
b31caa56 | 607 | pageHeight sub % Move down... |
e9aa6a7d | 608 | 2 copy moveto % Position text |
7bda0d95 | 609 | (44141 Airport View Drive, Suite 204, Hollywood, Maryland, 20636, USA.) CENTER |
610 | pageHeight sub % Move down... | |
b31caa56 | 611 | pageHeight sub % Move down... |
3f1835d3 | 612 | moveto % Position text |
72c5fd53 | 613 | (Need help? Contact your operating system vendor or visit "http://www.cups.org/".) CENTER |
e9aa6a7d | 614 | |
e9aa6a7d | 615 | % Then the CUPS logo.... |
616 | gsave | |
617 | pageWidth 4 mul | |
b31caa56 | 618 | pageHeight 4 mul |
e9aa6a7d | 619 | translate |
620 | pageWidth 9 mul CUPSLOGO | |
621 | grestore | |
622 | ||
623 | % And the ESP logo.... | |
624 | gsave | |
56194ec7 | 625 | pageWidth 58 mul |
b31caa56 | 626 | pageHeight 4 mul |
e9aa6a7d | 627 | translate |
628 | pageWidth 6 mul ESPLOGO | |
629 | grestore | |
630 | % Show the page... | |
631 | grestore | |
632 | showpage | |
633 | % | |
c9d3f842 | 634 | % End of "$Id$". |
e9aa6a7d | 635 | % |
636 | %%EOF |