2 %%BoundingBox: 0 0 612 792
5 %%DocumentData: Clean7Bit
6 %%DocumentSuppliedResources: procset testprint/2.3
7 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
8 %%Creator: Michael Sweet, Apple Inc.
9 %%CreationDate: D:20070606214000+0500
13 %%BeginResource procset testprint 2.3 0
15 % PostScript test page for CUPS.
17 % Copyright (c) 2007-2011 Apple Inc.
18 % Copyright (c) 1993-2007 Easy Software Products
20 % Licensed under Apache License v2.0. See the file "LICENSE" for more
23 /SEXTANT { % Draw a color wheel sextant...
24 % (name) white radius r g b SEXTANT -
25 % Loop through 100 shades...
28 dup 0.75 le { % Get "white" value
30 dup 0.75 div % val2 = val / 0.75
32 0 index 5 index mul % R = R * val2
33 1 index 5 index mul % G = G * val2
34 2 index 5 index mul % B = B * val2
36 4 -1 roll pop % Discard val2
39 dup neg 1 add 4 mul % val2 = (1 - val) * 4
41 0 index 5 index mul % R = R * val2
42 1 index neg 1 add add % + (1 - val2)
43 1 index 5 index mul % G = G * val2
44 2 index neg 1 add add % + (1 - val2)
45 2 index 5 index mul % B = B * val2
46 3 index neg 1 add add % + (1 - val2)
48 4 -1 roll pop % Discard val2
50 setrgbcolor % Set the color...
53 newpath % Start a new path...
54 dup 5 index mul % r1 = radius * val
55 0 0 3 -1 roll 0 60 arc % Draw the inner arc
57 dup 0.010101 add 5 index mul% r2 = (radius + 0.010101) * val
58 0 0 3 -1 roll 60 0 arcn % Draw the outer arc
60 closepath % Close the path
66 % Draw a line around the polygons...
67 pop pop pop dup % Pop R, G, B, start
71 0 0 3 -1 roll 0 60 arc % Arc around octant
72 closepath % Back to center
77 dup 30 cos mul % X = radius * cos(30)
78 exch 30 sin mul % Y = radius * sin(30)
79 moveto % Position label
82 30 rotate % Rotate label
83 dup 0.05 mul % Offset to the right
84 exch -0.05 mul % and down...
85 rmoveto % Offset label
89 /CENTER { % Draw centered text
91 dup stringwidth pop % Get the width of the string
92 0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
93 show % Show the string
95 /RIGHT { % Draw right-justified text
97 dup stringwidth pop % Get the width of the string
98 neg 0 rmoveto % Shift left the entire distance
99 show % Show the string
101 /NUMBER { % Draw a number
103 1 index 1 eq { % power == 1?
104 round cvi exch pop % Convert "n" to integer
106 1 index mul round exch div % Truncate extra decimal places
108 100 string cvs show % Convert to a string and show it...
110 /CUPSLOGO { % Draw the CUPS logo
112 % Start with a big C...
113 /Helvetica findfont 1 index scalefont setfont
118 % Then "UNIX Printing System" much smaller...
119 /Helvetica-Bold findfont 1 index 9 div scalefont setfont
121 dup dup 2.0 mul moveto
123 dup dup 1.6 mul moveto
133 % Determine the imageable area and device resolution...
134 initclip newpath clippath pathbbox % Get bounding rectangle
135 72 div /pageTop exch def % Get top margin in inches
136 72 div /pageRight exch def % Get right margin in inches
137 72 div /pageBottom exch def % Get bottom margin in inches
138 72 div /pageLeft exch def % Get left margin in inches
140 4 setlinewidth % Draw wide lines
141 0 setgray closepath stroke % Draw a clipping rectangle
143 /pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
144 /pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
146 72 72 dtransform % Get device resolution per inch
147 /yResolution exch abs def % yResolution = abs(yres)
148 /xResolution exch abs def % xResolution = abs(xres)
150 % Figure out the sizes of things...
151 /wheelSize % size of wheels
152 pageWidth pageHeight lt
158 /bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
159 pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
161 /mediumFont /Helvetica findfont % mediumFont = Helvetica
162 pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
164 /smallFont /Times-Roman findfont % smallFont = Times-Roman
165 pageHeight scalefont def % size = pageHeight (nominally 11)
167 % Draw rulers along the edges...
168 /CENTIMETER 72 2.54 div def
169 /MILLIMETER 72 25.4 div def
171 /Times-Roman findfont % Font for ruler numbers
172 11 scalefont setfont % 11 points
174 gsave % Left side inches
175 pageLeft 72 mul 0 translate % Offset left edge
177 1 setlinewidth % Draw normal lines
178 72 72 pageTop 72 mul { % Height inches
180 0 exch moveto 24 0 rlineto stroke % Draw tic mark
181 24 exch pageHeight sub moveto % Draw number
182 72 div cvi 10 string cvs RIGHT
185 0.5 setlinewidth % Draw thin lines
186 18 18 pageTop 72 mul { % 1/4 inches
187 0 exch moveto 15 0 rlineto stroke % Draw tic mark
190 9 9 pageTop 72 mul { % 1/8 inches
191 0 exch moveto 6 0 rlineto stroke % Draw tic mark
195 gsave % Bottom inches
196 0 pageBottom 72 mul translate % Offset bottom edge
198 1 setlinewidth % Draw normal lines
199 72 72 pageRight 72 mul { % Width inches
201 0 moveto 0 24 rlineto stroke % Draw tic mark
202 3 add 27 pageHeight sub moveto % Draw number
203 72 div cvi 10 string cvs show
206 0.5 setlinewidth % Draw thin lines
207 18 18 pageRight 72 mul { % 1/4 inches
208 0 moveto 0 15 rlineto stroke % Draw tic mark
211 9 9 pageRight 72 mul { % 1/8 inches
212 0 moveto 0 6 rlineto stroke % Draw tic mark
216 gsave % Right side centimeters
217 pageRight 72 mul 0 translate % Offset right edge
219 1 setlinewidth % Draw normal lines
220 CENTIMETER CENTIMETER
221 pageTop 72 mul { % Height centimeters
222 0 exch moveto -24 0 rlineto stroke% Draw tic mark
224 1 1 pageTop 2.54 mul { % Height labels
226 -24 exch CENTIMETER mul
227 pageHeight sub moveto % Draw number
228 cvi 10 string cvs show
231 0.5 setlinewidth % Draw thin lines
233 pageTop 72 mul { % 1/2 centimeters
234 0 exch moveto -15 0 rlineto stroke% Draw tic mark
236 0 MILLIMETER pageTop 72 mul { % Millimeters
237 0 exch moveto -6 0 rlineto stroke % Draw tic mark
241 gsave % Top centimeters
242 0 pageTop 72 mul translate % Offset top edge
244 1 setlinewidth % Draw normal lines
245 CENTIMETER CENTIMETER
246 pageRight 72 mul { % Width centimeters
247 0 moveto 0 -24 rlineto stroke % Draw tic mark
249 1 1 pageRight 2.54 mul { % Width labels
251 CENTIMETER mul 3 add -24 moveto % Draw number
252 cvi 10 string cvs show
255 0.5 setlinewidth % Draw thin lines
257 pageRight 72 mul { % 1/2 centimeters
258 0 moveto 0 -15 rlineto stroke % Draw tic mark
260 0 MILLIMETER pageRight 72 mul { % Millimeters
261 0 moveto 0 -6 rlineto stroke % Draw tic mark
265 % Offset page to account for lower-left margin...
270 % Set text font and color...
271 mediumFont setfont % Font
273 1 setlinewidth % Draw normal lines
275 % Draw the color wheel...
277 % Position the wheel on the left side...
278 pageWidth 18 mul % x = pageWidth * 1/4 * 72
279 pageHeight 54 mul % y = pageHeight * 3/4 * 72
286 dup (C) 3 -1 roll 0 1 1 SEXTANT 60 rotate
287 dup (M) 3 -1 roll 1 0 1 SEXTANT 60 rotate
288 dup (Y) 3 -1 roll 1 1 0 SEXTANT 60 rotate
289 dup (R) 3 -1 roll 1 0 0 SEXTANT 60 rotate
290 dup (G) 3 -1 roll 0 1 0 SEXTANT 60 rotate
291 dup (B) 3 -1 roll 0 0 1 SEXTANT 60 rotate
296 % Label the color wheel...
297 pageWidth 18 mul % x = pageWidth * 1/4 * 72
298 pageHeight 43 mul % y = pageHeight * 19/32 * 72
299 moveto % Position the text
300 (Color Wheel) CENTER % Show the text centered
302 % Draw the gray ramp...
304 % Position the gray ramp in the center...
305 pageWidth 36 mul % x = pageWidth * 1/2 * 72
306 pageHeight 54 mul % y = pageHeight * 3/4 * 72
307 wheelSize sub % - wheelSize
310 % Loop through 100 shades...
313 dup setgray % Set the grayscale...
315 % Draw the polygon...
316 newpath % Start a new path...
318 wheelSize -0.2 mul % X = -wheelSize / 5
319 1 index 2 mul wheelSize mul % Y = val * 2 * wheelSize
320 moveto % Move there...
322 wheelSize 0.4 mul 0 rlineto % Right side...
324 wheelSize 0.2 mul % X = wheelSize / 5
325 1 index 0.010101 add 2 mul wheelSize mul
326 % Y = (val + 0.010101) * 2 * wheelSize
327 lineto % Move there...
329 wheelSize -0.4 mul 0 rlineto % Left side...
331 closepath % Close the path
339 newpath % Start a new path
340 wheelSize -0.2 mul 0 moveto % Bottom left
341 wheelSize 0.4 mul 0 rlineto % Bottom right
342 0 wheelSize 2 mul rlineto % Upper right
343 wheelSize -0.4 mul 0 rlineto % Upper left
344 closepath % Close the path
345 stroke % Stroke it...
347 0 wheelSize -0.2 mul moveto % Center bottom for label
348 (K) CENTER % Center K at bottom
350 0 wheelSize 2.05 mul moveto % Center top for label
351 (W) CENTER % Center W at top
354 % Label the gray ramp...
355 pageWidth 36 mul % x = pageWidth * 1/2 * 72
356 pageHeight 43 mul % y = pageHeight * 19/32 * 72
357 moveto % Position the text
358 (Gray Ramp) CENTER % Show the text centered
361 % Draw radial lines...
363 0 setlinewidth % 1 pixel lines
365 % Position the lines on the left side...
366 pageWidth 54 mul % x = pageWidth * 3/4 * 72
367 pageHeight 54 mul % y = pageHeight * 3/4 * 72
373 % Loop at 1 degree increments
375 pop % Discard angle - not used
376 0 0 moveto % Start line at the center
377 dup 0 lineto % Draw to the radius
378 1 rotate % Rotate 1 degree
381 pop % Discard radius - not needed anymore
382 stroke % Draw lines...
387 pageWidth 54 mul % x = pageWidth * 3/4 * 72
388 pageHeight 43 mul % y = pageHeight * 19/32 * 72
389 moveto % Position the text
390 (1 Degree Radial Lines) CENTER % Show the text centered
393 pageHeight 15 mul % Height of imageable area
395 pageWidth 4.5 mul % x = pageWidth * 1/16 * 72
396 pageHeight 35.5 mul % y = pageHeight * 1/2 * 72
397 2 index sub % y -= height
398 pageWidth 28 mul % width = pageWidth * 1/4 * 72
400 0.5 setgray rectfill % Draw a shadow
402 pageWidth 4 mul % x = pageWidth * 1/16 * 72
403 pageHeight 36 mul % y = pageHeight * 1/2 * 72
404 2 index sub % y -= height
405 pageWidth 28 mul % width = pageWidth * 3/8 * 72
407 4 copy 1 setgray rectfill % Clear the box to white
408 0 setgray rectstroke % Draw a black box around it...
412 % Label the imageable area...
413 pageWidth 4 mul % x = pageWidth * 1/16 * 72
414 pageHeight 37 mul % y = pageHeight * 1/2 * 72
415 moveto % Position the text
416 mediumFont setfont % Font
417 (Imageable Area) show % Show the text
419 smallFont setfont % Font
420 pageWidth 14 mul % x = pageWidth * 3/16 * 72
421 pageHeight 36 mul % y = pageWidth * 1/2 * 72
422 pageHeight -2 mul add % y -= 2 * smallFont height
425 2 copy moveto % Move to x & y
426 (Page Size: ) RIGHT % Label
427 100 pageWidth NUMBER % pageWidth
429 100 pageHeight NUMBER % pageHeight
432 % Page Size millimeters
433 pageHeight sub % Move down...
435 2 copy moveto % Move to x & y
436 10 pageWidth 25.4 mul NUMBER % pageWidth
438 10 pageHeight 25.4 mul NUMBER % pageHeight
442 pageHeight 2 mul sub % Move down...
444 2 copy moveto % Move to x & y
445 (Lower-Left: ) RIGHT % Label
446 100 pageLeft NUMBER % pageLeft
448 100 pageBottom NUMBER % pageBottom
451 % Lower-left millimeters
452 pageHeight sub % Move down...
454 2 copy moveto % Move to x & y
455 10 pageLeft 25.4 mul NUMBER % pageLeft
457 10 pageBottom 25.4 mul NUMBER % pageBottom
461 pageHeight 2 mul sub % Move down...
463 2 copy moveto % Move to x & y
464 (Upper-Right: ) RIGHT % Label
465 100 pageRight NUMBER % pageRight
467 100 pageTop NUMBER % pageTop
470 % Upper-right millimeters
471 pageHeight sub % Move down...
473 2 copy moveto % Move to x & y
474 10 pageRight 25.4 mul NUMBER % pageRight
476 10 pageTop 25.4 mul NUMBER % pageTop
479 % Resolution dots-per-inch
480 pageHeight 2 mul sub % Move down...
482 2 copy moveto % Move to x & y
483 (Resolution: ) RIGHT % Label
484 1 xResolution NUMBER % xResolution
486 1 yResolution NUMBER % yResolution
489 % Resolution dots-per-meter
490 pageHeight sub % Move down...
492 moveto % Move to x & y
493 1 xResolution 39.27 mul NUMBER % xResolution
495 1 yResolution 39.27 mul NUMBER % yResolution
498 % Interpreter Information...
499 pageHeight 15 mul % Height of interpreter information
501 pageWidth 40.5 mul % x = pageWidth * 9/16 * 72
502 pageHeight 35.5 mul % y = pageHeight * 1/2 * 72
503 2 index sub % y -= height
504 pageWidth 28 mul % width = pageWidth * 1/4 * 72
506 0.5 setgray rectfill % Draw a shadow
508 pageWidth 40 mul % x = pageWidth * 9/16 * 72
509 pageHeight 36 mul % y = pageHeight * 1/2 * 72
510 2 index sub % y -= height
511 pageWidth 28 mul % width = pageWidth * 3/8 * 72
513 4 copy 1 setgray rectfill % Clear the box to white
514 0 setgray rectstroke % Draw a black box around it...
518 % Label the interpreter info...
519 pageWidth 40 mul % x = pageWidth * 9/16 * 72
520 pageHeight 37 mul % y = pageHeight * 1/2 * 72
521 moveto % Position the text
522 mediumFont setfont % Font
523 (Interpreter Information) show % Show the text
525 smallFont setfont % Font
526 pageWidth 49 mul % x = pageWidth * 11/16 * 72
527 pageHeight 36 mul % y = pageWidth * 1/2 * 72
528 pageHeight 2 mul sub % y -= 2 * smallFont height
531 2 copy moveto % Move to x & y
532 (PostScript: ) RIGHT % Label
533 (Level ) show % "Level "
534 1 languagelevel NUMBER % Language level
537 pageHeight 2 mul sub % Move down...
538 2 copy moveto % Move to x & y
539 (Version: ) RIGHT % Label
540 version show % Version
542 1 revision NUMBER % Revision
546 pageHeight 2 mul sub % Move down...
547 2 copy moveto % Move to x & y
548 (Product: ) RIGHT % Label
549 product show % Product name
552 pageHeight 2 mul sub % Move down...
553 moveto % Move to x & y
554 (Serial #: ) RIGHT % Label
555 1 serialnumber NUMBER % S/N
557 % Draw the label at the top...
558 pageWidth 36 mul % Center of page
559 pageHeight 66 mul % Top of page (11/12ths)
560 moveto % Position text
561 bigFont setfont % Font
562 (Printer Test Page) CENTER % Show text centered
564 % Draw the copyright notice at the bottom...
565 pageWidth 17 mul % Center of page
566 pageHeight 10 mul % Bottom of page
567 moveto % Position text
568 (Printed Using CUPS v2.3.x) show
570 pageWidth 17 mul % Left side of page
571 pageHeight 8 mul % Move down...
572 2 copy moveto % Position text
573 smallFont setfont % Font
574 (Copyright 2007-2018 Apple Inc., All Rights Reserved. CUPS and the CUPS logo are trademarks) show
575 pageHeight 2 add sub % Move down...
576 2 copy moveto % Position text
577 (of Apple Inc., One Apple Park Way, Cupertino, CA 95014, USA.) show
578 pageHeight 2 mul 4 add sub % Move down...
579 moveto % Position text
580 (Need help? Contact your operating system vendor or visit "http://www.cups.org/".) show
582 % Then the CUPS logo....
587 pageWidth 15 mul CUPSLOGO