2 %%BoundingBox: 0 0 612 792
5 %%DocumentData: Clean7Bit
6 %%DocumentSuppliedResources: procset testprint/1.3
7 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
8 %%Creator: Michael Sweet, Easy Software Products
9 %%CreationDate: D:20070220113000+0500
13 %%BeginResource procset testprint 1.3 0
15 % PostScript test page for the Common UNIX Printing System ("CUPS").
17 % Copyright 1993-2007 Easy Software Products
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
26 % Attn: CUPS Licensing Information
27 % Easy Software Products
28 % 44141 Airport View Drive, Suite 204
29 % Hollywood, Maryland 20636 USA
31 % Voice: (301) 373-9600
32 % EMail: cups-info@cups.org
33 % WWW: http://www.cups.org
35 /SEXTANT { % Draw a color wheel sextant...
36 % (name) white radius r g b SEXTANT -
37 % Loop through 100 shades...
40 dup 0.75 le { % Get "white" value
42 dup 0.75 div % val2 = val / 0.75
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
48 4 -1 roll pop % Discard val2
51 dup neg 1 add 4 mul % val2 = (1 - val) * 4
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)
60 4 -1 roll pop % Discard val2
62 setrgbcolor % Set the color...
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
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
72 closepath % Close the path
78 % Draw a line around the polygons...
79 pop pop pop dup % Pop R, G, B, start
83 0 0 3 -1 roll 0 60 arc % Arc around octant
84 closepath % Back to center
89 dup 30 cos mul % X = radius * cos(30)
90 exch 30 sin mul % Y = radius * sin(30)
91 moveto % Position label
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
101 /CENTER { % Draw centered text
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
107 /RIGHT { % Draw right-justified text
109 dup stringwidth pop % Get the width of the string
110 neg 0 rmoveto % Shift left the entire distance
111 show % Show the string
113 /NUMBER { % Draw a number
115 1 index 1 eq { % power == 1?
116 round cvi exch pop % Convert "n" to integer
118 1 index mul round exch div % Truncate extra decimal places
120 100 string cvs show % Convert to a string and show it...
122 /CUPSLOGO { % Draw the CUPS logo
124 % Start with a big C...
125 /Helvetica findfont 1 index scalefont setfont
130 % Then "UNIX Printing System" much smaller...
131 /Helvetica-Bold findfont 1 index 9 div scalefont setfont
133 dup dup 2.0 mul moveto
135 dup dup 1.6 mul moveto
140 /ESPLOGO { % Draw the ESP logo
145 /Helvetica-Bold findfont 38.2 scalefont setfont
147 -3 19.5 moveto (ESP) show
149 /Helvetica-Narrow-Oblique findfont 8.2 scalefont setfont
150 0 2 moveto (Easy Software Products) show
152 1 -0.01 0 { dup neg 1.0 add setgray 0 11 3 -1 roll 68 mul 4.5 rectfill } for
155 67.5 11 4.5 4.5 rectfill
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
170 4 setlinewidth % Draw wide lines
171 0 setgray closepath stroke % Draw a clipping rectangle
173 /pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
174 /pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
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)
180 % Figure out the sizes of things...
181 /wheelSize % size of wheels
182 pageWidth pageHeight lt
188 /bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
189 pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
191 /mediumFont /Helvetica findfont % mediumFont = Helvetica
192 pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
194 /smallFont /Times-Roman findfont % smallFont = Times-Roman
195 pageHeight scalefont def % size = pageHeight (nominally 11)
197 % Draw rulers along the edges...
198 /CENTIMETER 72 2.54 div def
199 /MILLIMETER 72 25.4 div def
201 /Times-Roman findfont % Font for ruler numbers
202 11 scalefont setfont % 11 points
204 gsave % Left side inches
205 pageLeft 72 mul 0 translate % Offset left edge
207 1 setlinewidth % Draw normal lines
208 72 72 pageTop 72 mul { % Height inches
210 0 exch moveto 24 0 rlineto stroke % Draw tic mark
211 24 exch pageHeight sub moveto % Draw number
212 72 div cvi 10 string cvs RIGHT
215 0.5 setlinewidth % Draw thin lines
216 18 18 pageTop 72 mul { % 1/4 inches
217 0 exch moveto 15 0 rlineto stroke % Draw tic mark
220 9 9 pageTop 72 mul { % 1/8 inches
221 0 exch moveto 6 0 rlineto stroke % Draw tic mark
225 gsave % Bottom inches
226 0 pageBottom 72 mul translate % Offset bottom edge
228 1 setlinewidth % Draw normal lines
229 72 72 pageRight 72 mul { % Width inches
231 0 moveto 0 24 rlineto stroke % Draw tic mark
232 3 add 27 pageHeight sub moveto % Draw number
233 72 div cvi 10 string cvs show
236 0.5 setlinewidth % Draw thin lines
237 18 18 pageRight 72 mul { % 1/4 inches
238 0 moveto 0 15 rlineto stroke % Draw tic mark
241 9 9 pageRight 72 mul { % 1/8 inches
242 0 moveto 0 6 rlineto stroke % Draw tic mark
246 gsave % Right side centimeters
247 pageRight 72 mul 0 translate % Offset right edge
249 1 setlinewidth % Draw normal lines
250 CENTIMETER CENTIMETER
251 pageTop 72 mul { % Height centimeters
252 0 exch moveto -24 0 rlineto stroke% Draw tic mark
254 1 1 pageTop 2.54 mul { % Height labels
256 -24 exch CENTIMETER mul
257 pageHeight sub moveto % Draw number
258 cvi 10 string cvs show
261 0.5 setlinewidth % Draw thin lines
263 pageTop 72 mul { % 1/2 centimeters
264 0 exch moveto -15 0 rlineto stroke% Draw tic mark
266 0 MILLIMETER pageTop 72 mul { % Millimeters
267 0 exch moveto -6 0 rlineto stroke % Draw tic mark
271 gsave % Top centimeters
272 0 pageTop 72 mul translate % Offset top edge
274 1 setlinewidth % Draw normal lines
275 CENTIMETER CENTIMETER
276 pageRight 72 mul { % Width centimeters
277 0 moveto 0 -24 rlineto stroke % Draw tic mark
279 1 1 pageRight 2.54 mul { % Width labels
281 CENTIMETER mul 3 add -24 moveto % Draw number
282 cvi 10 string cvs show
285 0.5 setlinewidth % Draw thin lines
287 pageRight 72 mul { % 1/2 centimeters
288 0 moveto 0 -15 rlineto stroke % Draw tic mark
290 0 MILLIMETER pageRight 72 mul { % Millimeters
291 0 moveto 0 -6 rlineto stroke % Draw tic mark
295 % Offset page to account for lower-left margin...
300 % Set text font and color...
301 mediumFont setfont % Font
303 1 setlinewidth % Draw normal lines
305 % Draw the color wheel...
307 % Position the wheel on the left side...
308 pageWidth 18 mul % x = pageWidth * 1/4 * 72
309 pageHeight 54 mul % y = pageHeight * 3/4 * 72
316 dup (C) 3 -1 roll 0 1 1 SEXTANT 60 rotate
317 dup (M) 3 -1 roll 1 0 1 SEXTANT 60 rotate
318 dup (Y) 3 -1 roll 1 1 0 SEXTANT 60 rotate
319 dup (R) 3 -1 roll 1 0 0 SEXTANT 60 rotate
320 dup (G) 3 -1 roll 0 1 0 SEXTANT 60 rotate
321 dup (B) 3 -1 roll 0 0 1 SEXTANT 60 rotate
326 % Label the color wheel...
327 pageWidth 18 mul % x = pageWidth * 1/4 * 72
328 pageHeight 43 mul % y = pageHeight * 19/32 * 72
329 moveto % Position the text
330 (Color Wheel) CENTER % Show the text centered
332 % Draw the gray ramp...
334 % Position the gray ramp in the center...
335 pageWidth 36 mul % x = pageWidth * 1/2 * 72
336 pageHeight 54 mul % y = pageHeight * 3/4 * 72
337 wheelSize sub % - wheelSize
340 % Loop through 100 shades...
343 dup setgray % Set the grayscale...
345 % Draw the polygon...
346 newpath % Start a new path...
348 wheelSize -0.2 mul % X = -wheelSize / 5
349 1 index 2 mul wheelSize mul % Y = val * 2 * wheelSize
350 moveto % Move there...
352 wheelSize 0.4 mul 0 rlineto % Right side...
354 wheelSize 0.2 mul % X = wheelSize / 5
355 1 index 0.010101 add 2 mul wheelSize mul
356 % Y = (val + 0.010101) * 2 * wheelSize
357 lineto % Move there...
359 wheelSize -0.4 mul 0 rlineto % Left side...
361 closepath % Close the path
369 newpath % Start a new path
370 wheelSize -0.2 mul 0 moveto % Bottom left
371 wheelSize 0.4 mul 0 rlineto % Bottom right
372 0 wheelSize 2 mul rlineto % Upper right
373 wheelSize -0.4 mul 0 rlineto % Upper left
374 closepath % Close the path
375 stroke % Stroke it...
377 0 wheelSize -0.2 mul moveto % Center bottom for label
378 (K) CENTER % Center K at bottom
380 0 wheelSize 2.05 mul moveto % Center top for label
381 (W) CENTER % Center W at top
384 % Label the gray ramp...
385 pageWidth 36 mul % x = pageWidth * 1/2 * 72
386 pageHeight 43 mul % y = pageHeight * 19/32 * 72
387 moveto % Position the text
388 (Gray Ramp) CENTER % Show the text centered
391 % Draw radial lines...
393 0 setlinewidth % 1 pixel lines
395 % Position the lines on the left side...
396 pageWidth 54 mul % x = pageWidth * 3/4 * 72
397 pageHeight 54 mul % y = pageHeight * 3/4 * 72
403 % Loop at 1 degree increments
405 pop % Discard angle - not used
406 0 0 moveto % Start line at the center
407 dup 0 lineto % Draw to the radius
408 1 rotate % Rotate 1 degree
411 pop % Discard radius - not needed anymore
412 stroke % Draw lines...
417 pageWidth 54 mul % x = pageWidth * 3/4 * 72
418 pageHeight 43 mul % y = pageHeight * 19/32 * 72
419 moveto % Position the text
420 (1 Degree Radial Lines) CENTER % Show the text centered
423 pageHeight 15 mul % Height of imageable area
425 pageWidth 4.5 mul % x = pageWidth * 1/16 * 72
426 pageHeight 35.5 mul % y = pageHeight * 1/2 * 72
427 2 index sub % y -= height
428 pageWidth 28 mul % width = pageWidth * 1/4 * 72
430 0.5 setgray rectfill % Draw a shadow
432 pageWidth 4 mul % x = pageWidth * 1/16 * 72
433 pageHeight 36 mul % y = pageHeight * 1/2 * 72
434 2 index sub % y -= height
435 pageWidth 28 mul % width = pageWidth * 3/8 * 72
437 4 copy 1 setgray rectfill % Clear the box to white
438 0 setgray rectstroke % Draw a black box around it...
442 % Label the imageable area...
443 pageWidth 4 mul % x = pageWidth * 1/16 * 72
444 pageHeight 37 mul % y = pageHeight * 1/2 * 72
445 moveto % Position the text
446 mediumFont setfont % Font
447 (Imageable Area) show % Show the text
449 smallFont setfont % Font
450 pageWidth 14 mul % x = pageWidth * 3/16 * 72
451 pageHeight 36 mul % y = pageWidth * 1/2 * 72
452 pageHeight -2 mul add % y -= 2 * smallFont height
455 2 copy moveto % Move to x & y
456 (Page Size: ) RIGHT % Label
457 100 pageWidth NUMBER % pageWidth
459 100 pageHeight NUMBER % pageHeight
462 % Page Size millimeters
463 pageHeight sub % Move down...
465 2 copy moveto % Move to x & y
466 10 pageWidth 25.4 mul NUMBER % pageWidth
468 10 pageHeight 25.4 mul NUMBER % pageHeight
472 pageHeight 2 mul sub % Move down...
474 2 copy moveto % Move to x & y
475 (Lower-Left: ) RIGHT % Label
476 100 pageLeft NUMBER % pageLeft
478 100 pageBottom NUMBER % pageBottom
481 % Lower-left millimeters
482 pageHeight sub % Move down...
484 2 copy moveto % Move to x & y
485 10 pageLeft 25.4 mul NUMBER % pageLeft
487 10 pageBottom 25.4 mul NUMBER % pageBottom
491 pageHeight 2 mul sub % Move down...
493 2 copy moveto % Move to x & y
494 (Upper-Right: ) RIGHT % Label
495 100 pageRight NUMBER % pageRight
497 100 pageTop NUMBER % pageTop
500 % Upper-right millimeters
501 pageHeight sub % Move down...
503 2 copy moveto % Move to x & y
504 10 pageRight 25.4 mul NUMBER % pageRight
506 10 pageTop 25.4 mul NUMBER % pageTop
509 % Resolution dots-per-inch
510 pageHeight 2 mul sub % Move down...
512 2 copy moveto % Move to x & y
513 (Resolution: ) RIGHT % Label
514 1 xResolution NUMBER % xResolution
516 1 yResolution NUMBER % yResolution
519 % Resolution dots-per-meter
520 pageHeight sub % Move down...
522 moveto % Move to x & y
523 1 xResolution 39.27 mul NUMBER % xResolution
525 1 yResolution 39.27 mul NUMBER % yResolution
528 % Interpreter Information...
529 pageHeight 15 mul % Height of interpreter information
531 pageWidth 40.5 mul % x = pageWidth * 9/16 * 72
532 pageHeight 35.5 mul % y = pageHeight * 1/2 * 72
533 2 index sub % y -= height
534 pageWidth 28 mul % width = pageWidth * 1/4 * 72
536 0.5 setgray rectfill % Draw a shadow
538 pageWidth 40 mul % x = pageWidth * 9/16 * 72
539 pageHeight 36 mul % y = pageHeight * 1/2 * 72
540 2 index sub % y -= height
541 pageWidth 28 mul % width = pageWidth * 3/8 * 72
543 4 copy 1 setgray rectfill % Clear the box to white
544 0 setgray rectstroke % Draw a black box around it...
548 % Label the interpreter info...
549 pageWidth 40 mul % x = pageWidth * 9/16 * 72
550 pageHeight 37 mul % y = pageHeight * 1/2 * 72
551 moveto % Position the text
552 mediumFont setfont % Font
553 (Interpreter Information) show % Show the text
555 smallFont setfont % Font
556 pageWidth 49 mul % x = pageWidth * 11/16 * 72
557 pageHeight 36 mul % y = pageWidth * 1/2 * 72
558 pageHeight 2 mul sub % y -= 2 * smallFont height
561 2 copy moveto % Move to x & y
562 (PostScript: ) RIGHT % Label
563 (Level ) show % "Level "
564 1 languagelevel NUMBER % Language level
567 pageHeight 2 mul sub % Move down...
568 2 copy moveto % Move to x & y
569 (Version: ) RIGHT % Label
570 version show % Version
572 1 revision NUMBER % Revision
576 pageHeight 2 mul sub % Move down...
577 2 copy moveto % Move to x & y
578 (Product: ) RIGHT % Label
579 product show % Product name
582 pageHeight 2 mul sub % Move down...
583 moveto % Move to x & y
584 (Serial #: ) RIGHT % Label
585 1 serialnumber NUMBER % S/N
587 % Draw the label at the top...
588 pageWidth 36 mul % Center of page
589 pageHeight 66 mul % Top of page (11/12ths)
590 moveto % Position text
591 bigFont setfont % Font
592 (Printer Test Page) CENTER % Show text centered
594 % Draw the copyright notice at the bottom...
595 pageWidth 36 mul % Center of page
596 pageHeight 12 mul % Bottom of page
597 moveto % Position text
598 (Printed Using CUPS v1.3.x) CENTER % Show text centered
600 pageWidth 34 mul % Left-center of page
601 pageHeight 8 mul % Move down...
602 2 copy moveto % Position text
603 smallFont setfont % Font
604 (Copyright 1993-2006 Easy Software Products, All Rights Reserved.) CENTER
605 pageHeight sub % Move down...
606 2 copy moveto % Position text
607 (CUPS, and the CUPS logo are the trademark property of Easy Software Products,) CENTER
608 pageHeight sub % Move down...
609 2 copy moveto % Position text
610 (44141 Airport View Drive, Suite 204, Hollywood, Maryland, 20636, USA.) CENTER
611 pageHeight sub % Move down...
612 pageHeight sub % Move down...
613 moveto % Position text
614 (Need help? Contact your operating system vendor or visit "http://www.cups.org/".) CENTER
616 % Then the CUPS logo....
621 pageWidth 9 mul CUPSLOGO
624 % And the ESP logo....
629 pageWidth 6 mul ESPLOGO