| 1 |
%!PS-Adobe-3.0 |
| 2 |
%%BoundingBox: 0 0 612 792 |
| 3 |
%%Pages: 1 |
| 4 |
%%LanguageLevel: 1 |
| 5 |
%%DocumentData: Clean7Bit |
| 6 |
%%DocumentSuppliedResources: procset testprint/1.1 |
| 7 |
%%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman |
| 8 |
%%Creator: Michael Sweet, Easy Software Products |
| 9 |
%%CreationDate: May 11, 1999 |
| 10 |
%%Title: Test Page |
| 11 |
%%EndComments |
| 12 |
%%BeginProlog |
| 13 |
%%BeginResource procset testprint 1.1 0 |
| 14 |
% |
| 15 |
% PostScript test page for the Common UNIX Printing System ("CUPS"). |
| 16 |
% |
| 17 |
% Copyright 1993-2005 by Easy Software Products |
| 18 |
% |
| 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 |
| 29 |
% Hollywood, Maryland 20636 USA |
| 30 |
% |
| 31 |
% Voice: (301) 373-9600 |
| 32 |
% EMail: [email protected] |
| 33 |
% WWW: http://www.cups.org |
| 34 |
% |
| 35 |
/OCTANT { % Draw a color wheel OCTANT... |
| 36 |
% (name) radius r g b OCTANT - |
| 37 |
% Loop through 100 shades... |
| 38 |
0 0.010101 0.98 { |
| 39 |
% Set the color... |
| 40 |
3 index 1 eq % R == 1? |
| 41 |
3 index 1 eq % G == 1? |
| 42 |
3 index 1 eq % B == 1? |
| 43 |
and and { |
| 44 |
0 index 4 index mul % R * val |
| 45 |
1 index 4 index mul % G * val |
| 46 |
2 index 4 index mul % B * val |
| 47 |
} { |
| 48 |
0 index 4 index mul % R * val |
| 49 |
1 index neg 1 add add % + (1 - val) |
| 50 |
1 index 4 index mul % G * val |
| 51 |
2 index neg 1 add add % + (1 - val) |
| 52 |
2 index 4 index mul % B * val |
| 53 |
3 index neg 1 add add % + (1 - val) |
| 54 |
} ifelse |
| 55 |
setrgbcolor |
| 56 |
|
| 57 |
% Draw a polygon... |
| 58 |
dup 5 index mul dup 0 % x1, y1 |
| 59 |
moveto |
| 60 |
0.707106781 mul dup lineto % x2, y2 |
| 61 |
|
| 62 |
0.010101 add 4 index mul dup % x3 |
| 63 |
0.707106781 mul dup lineto % x3, y3 |
| 64 |
0 lineto % x4, y4 |
| 65 |
closepath |
| 66 |
fill |
| 67 |
} for |
| 68 |
|
| 69 |
% Draw a line around the polygons... |
| 70 |
pop pop pop dup |
| 71 |
0 setgray |
| 72 |
0 0 moveto |
| 73 |
dup 0 lineto |
| 74 |
0.707106781 mul dup lineto |
| 75 |
closepath |
| 76 |
stroke |
| 77 |
|
| 78 |
% Draw the label... |
| 79 |
0 exch dup -9 div exch % text offset = 0, -radius/9 |
| 80 |
dup 0.923879532 mul % x = radius * cos(22.5) |
| 81 |
exch 0.382683432 mul % y = radius * cos(22.5) |
| 82 |
moveto % position label |
| 83 |
gsave |
| 84 |
22.5 rotate % rotate label |
| 85 |
rmoveto % offset label |
| 86 |
show % show label |
| 87 |
grestore |
| 88 |
} bind def |
| 89 |
/CENTER { % Draw centered text |
| 90 |
% (name) CENTER - |
| 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 |
| 94 |
} bind def |
| 95 |
/RIGHT { % Draw right-justified text |
| 96 |
% (name) RIGHT - |
| 97 |
dup stringwidth pop % Get the width of the string |
| 98 |
neg 0 rmoveto % Shift left the entire distance |
| 99 |
show % Show the string |
| 100 |
} bind def |
| 101 |
/NUMBER { % Draw a number |
| 102 |
% power n NUMBER - |
| 103 |
1 index 1 eq { % power == 1? |
| 104 |
round cvi exch pop % Convert "n" to integer |
| 105 |
} { |
| 106 |
1 index mul round exch div % Truncate extra decimal places |
| 107 |
} ifelse |
| 108 |
100 string cvs show % Convert to a string and show it... |
| 109 |
} bind def |
| 110 |
/CUPSLOGO { % Draw the CUPS logo |
| 111 |
% height CUPSLOGO |
| 112 |
% Start with a big C... |
| 113 |
/Helvetica findfont 1 index scalefont setfont |
| 114 |
0 setgray |
| 115 |
0 0 moveto |
| 116 |
(C) show |
| 117 |
|
| 118 |
% Then "UNIX Printing System" much smaller... |
| 119 |
/Helvetica-Bold findfont 1 index 9 div scalefont setfont |
| 120 |
0.25 mul |
| 121 |
dup dup 2.0 mul moveto |
| 122 |
(UNIX) show |
| 123 |
dup dup 1.6 mul moveto |
| 124 |
(Printing) show |
| 125 |
dup 1.2 mul moveto |
| 126 |
(System) show |
| 127 |
} bind def |
| 128 |
/ESPLOGO { % Draw the ESP logo |
| 129 |
% height ESPLOGO |
| 130 |
% Compute the size of the logo... |
| 131 |
0 0 |
| 132 |
2 index 1.5 mul 3 index |
| 133 |
|
| 134 |
% Do the "metallic" fill from 10% black to 40% black... |
| 135 |
1 -0.001 0 { |
| 136 |
dup % loopval |
| 137 |
-0.15 mul % loopval * -0.15 |
| 138 |
0.9 add % 0.9 - loopval * 0.15 |
| 139 |
setgray % set gray shade |
| 140 |
|
| 141 |
0 % x |
| 142 |
1 index neg % loopval |
| 143 |
1 add % 1 - loopval |
| 144 |
3 index % height |
| 145 |
mul % height * (1 - loopval) |
| 146 |
moveto % starting point |
| 147 |
|
| 148 |
dup % loopval |
| 149 |
3 index % width |
| 150 |
mul % loopval * width |
| 151 |
2 index % height |
| 152 |
lineto % Next point |
| 153 |
|
| 154 |
0 % x |
| 155 |
2 index % height |
| 156 |
lineto % Next point |
| 157 |
|
| 158 |
closepath |
| 159 |
fill |
| 160 |
|
| 161 |
dup % loopval |
| 162 |
0.15 mul % loopval * 0.15 |
| 163 |
0.6 add % 0.6 + loopval * 0.15 |
| 164 |
setgray |
| 165 |
|
| 166 |
dup % loopval |
| 167 |
neg 1 add % 1 - loopval |
| 168 |
3 index % width |
| 169 |
mul % (1 - loopval) * width |
| 170 |
0 % y |
| 171 |
moveto % Starting point |
| 172 |
|
| 173 |
2 index % width |
| 174 |
exch % loopval |
| 175 |
2 index % height |
| 176 |
mul % loopval * height |
| 177 |
lineto % Next point |
| 178 |
|
| 179 |
1 index % width |
| 180 |
0 % y |
| 181 |
lineto % Next point |
| 182 |
|
| 183 |
closepath |
| 184 |
fill |
| 185 |
} for |
| 186 |
|
| 187 |
0 setgray rectstroke |
| 188 |
|
| 189 |
/Helvetica-BoldOblique findfont 1 index 3 div scalefont setfont |
| 190 |
dup 40 div |
| 191 |
|
| 192 |
dup 4 mul 1 index 25 mul moveto (E) show |
| 193 |
dup 10 mul 1 index 15 mul moveto (S) show |
| 194 |
dup 16 mul 1 index 5 mul moveto (P) show |
| 195 |
|
| 196 |
/Helvetica-BoldOblique findfont 2 index 5 div scalefont setfont |
| 197 |
dup 14 mul 1 index 29 mul moveto (asy) show |
| 198 |
dup 20 mul 1 index 19 mul moveto (oftware) show |
| 199 |
dup 26 mul 1 index 9 mul moveto (roducts) show |
| 200 |
|
| 201 |
pop |
| 202 |
} bind def |
| 203 |
%%EndResource |
| 204 |
%%EndProlog |
| 205 |
%%Page: 1 1 |
| 206 |
gsave |
| 207 |
|
| 208 |
% Determine the imageable area and device resolution... |
| 209 |
initclip newpath clippath pathbbox % Get bounding rectangle |
| 210 |
72 div /pageTop exch def % Get top margin in inches |
| 211 |
72 div /pageRight exch def % Get right margin in inches |
| 212 |
72 div /pageBottom exch def % Get bottom margin in inches |
| 213 |
72 div /pageLeft exch def % Get left margin in inches |
| 214 |
|
| 215 |
4 setlinewidth % Draw wide lines |
| 216 |
0 setgray closepath stroke % Draw a clipping rectangle |
| 217 |
1 setlinewidth % Draw normal lines |
| 218 |
|
| 219 |
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft |
| 220 |
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom |
| 221 |
|
| 222 |
72 72 dtransform % Get device resolution per inch |
| 223 |
/yResolution exch abs def % yResolution = abs(yres) |
| 224 |
/xResolution exch abs def % xResolution = abs(xres) |
| 225 |
|
| 226 |
% Figure out the sizes of things... |
| 227 |
/wheelSize % size of wheels |
| 228 |
pageWidth pageHeight lt |
| 229 |
{ pageWidth 9 mul } |
| 230 |
{ pageHeight 7 mul } |
| 231 |
ifelse def |
| 232 |
|
| 233 |
% Create fonts... |
| 234 |
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold |
| 235 |
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33) |
| 236 |
|
| 237 |
/mediumFont /Helvetica findfont % mediumFont = Helvetica |
| 238 |
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5) |
| 239 |
|
| 240 |
/smallFont /Times-Roman findfont % smallFont = Times-Roman |
| 241 |
pageHeight scalefont def % size = pageHeight (nominally 11) |
| 242 |
|
| 243 |
% Offset page to account for lower-left margin... |
| 244 |
pageLeft 72 mul |
| 245 |
pageBottom 72 mul |
| 246 |
translate |
| 247 |
|
| 248 |
% Draw the color wheel... |
| 249 |
mediumFont setfont % Font |
| 250 |
0 setgray % Color |
| 251 |
|
| 252 |
gsave |
| 253 |
% Position the wheel on the left side... |
| 254 |
pageWidth 18 mul % x = pageWidth * 1/4 * 72 |
| 255 |
pageHeight 54 mul % y = pageHeight * 3/4 * 72 |
| 256 |
translate |
| 257 |
|
| 258 |
% Size the wheel... |
| 259 |
wheelSize |
| 260 |
|
| 261 |
% Draw the colors... |
| 262 |
dup (C) exch 0 1 1 OCTANT 45 rotate |
| 263 |
dup (M) exch 1 0 1 OCTANT 45 rotate |
| 264 |
dup (Y) exch 1 1 0 OCTANT 45 rotate |
| 265 |
dup (K) exch 0 0 0 OCTANT 45 rotate |
| 266 |
dup (R) exch 1 0 0 OCTANT 45 rotate |
| 267 |
dup (G) exch 0 1 0 OCTANT 45 rotate |
| 268 |
dup (B) exch 0 0 1 OCTANT 45 rotate |
| 269 |
(W) exch 1 1 1 OCTANT 45 rotate |
| 270 |
grestore |
| 271 |
|
| 272 |
% Label the color wheel... |
| 273 |
pageWidth 18 mul % x = pageWidth * 1/4 * 72 |
| 274 |
pageHeight 44 mul % y = pageHeight * 19/32 * 72 |
| 275 |
moveto % Position the text |
| 276 |
(Color Wheel) CENTER % Show the text centered |
| 277 |
|
| 278 |
% Draw radial lines... |
| 279 |
gsave |
| 280 |
0 setlinewidth % 1 pixel lines |
| 281 |
|
| 282 |
% Position the lines on the left side... |
| 283 |
pageWidth 54 mul % x = pageWidth * 3/4 * 72 |
| 284 |
pageHeight 54 mul % y = pageHeight * 3/4 * 72 |
| 285 |
translate |
| 286 |
|
| 287 |
% Size the wheel... |
| 288 |
wheelSize |
| 289 |
|
| 290 |
% Loop at 1 degree increments |
| 291 |
0 1 359 { |
| 292 |
pop % Discard angle - not used |
| 293 |
0 0 moveto % Start line at the center |
| 294 |
dup 0 lineto % Draw to the radius |
| 295 |
1 rotate % Rotate 1 degree |
| 296 |
} for |
| 297 |
|
| 298 |
pop % Discard radius - not needed anymore |
| 299 |
stroke % Draw lines... |
| 300 |
|
| 301 |
grestore |
| 302 |
|
| 303 |
% Label the lines... |
| 304 |
pageWidth 54 mul % x = pageWidth * 3/4 * 72 |
| 305 |
pageHeight 44 mul % y = pageHeight * 19/32 * 72 |
| 306 |
moveto % Position the text |
| 307 |
(1 Degree Radial Lines) CENTER % Show the text centered |
| 308 |
|
| 309 |
% Imageable area... |
| 310 |
pageHeight 15 mul % Height of imageable area |
| 311 |
|
| 312 |
pageWidth 4.5 mul % x = pageWidth * 1/16 * 72 |
| 313 |
pageHeight 35.5 mul % y = pageHeight * 1/2 * 72 |
| 314 |
2 index sub % y -= height |
| 315 |
pageWidth 28 mul % width = pageWidth * 1/4 * 72 |
| 316 |
3 index % height |
| 317 |
0.5 setgray rectfill % Draw a shadow |
| 318 |
|
| 319 |
pageWidth 4 mul % x = pageWidth * 1/16 * 72 |
| 320 |
pageHeight 36 mul % y = pageHeight * 1/2 * 72 |
| 321 |
2 index sub % y -= height |
| 322 |
pageWidth 28 mul % width = pageWidth * 3/8 * 72 |
| 323 |
3 index % height |
| 324 |
4 copy 1 setgray rectfill % Clear the box to white |
| 325 |
0 setgray rectstroke % Draw a black box around it... |
| 326 |
|
| 327 |
pop % Discard height |
| 328 |
|
| 329 |
% Label the imageable area... |
| 330 |
pageWidth 4 mul % x = pageWidth * 1/16 * 72 |
| 331 |
pageHeight 37 mul % y = pageHeight * 1/2 * 72 |
| 332 |
moveto % Position the text |
| 333 |
mediumFont setfont % Font |
| 334 |
(Imageable Area) show % Show the text |
| 335 |
|
| 336 |
smallFont setfont % Font |
| 337 |
pageWidth 14 mul % x = pageWidth * 3/16 * 72 |
| 338 |
pageHeight 36 mul % y = pageWidth * 1/2 * 72 |
| 339 |
pageHeight -2 mul add % y -= 2 * smallFont height |
| 340 |
|
| 341 |
% Page Size inches |
| 342 |
2 copy moveto % Move to x & y |
| 343 |
(Page Size: ) RIGHT % Label |
| 344 |
100 pageWidth NUMBER % pageWidth |
| 345 |
(x) show % "x" |
| 346 |
100 pageHeight NUMBER % pageHeight |
| 347 |
(in) show % "in" |
| 348 |
|
| 349 |
% Page Size millimeters |
| 350 |
pageHeight sub % Move down... |
| 351 |
|
| 352 |
2 copy moveto % Move to x & y |
| 353 |
10 pageWidth 25.4 mul NUMBER % pageWidth |
| 354 |
(x) show % "x" |
| 355 |
10 pageHeight 25.4 mul NUMBER % pageHeight |
| 356 |
(mm) show % "mm" |
| 357 |
|
| 358 |
% Lower-left inches |
| 359 |
pageHeight 2 mul sub % Move down... |
| 360 |
|
| 361 |
2 copy moveto % Move to x & y |
| 362 |
(Lower-Left: ) RIGHT % Label |
| 363 |
100 pageLeft NUMBER % pageLeft |
| 364 |
(x) show % "x" |
| 365 |
100 pageBottom NUMBER % pageBottom |
| 366 |
(in) show % "in" |
| 367 |
|
| 368 |
% Lower-left millimeters |
| 369 |
pageHeight sub % Move down... |
| 370 |
|
| 371 |
2 copy moveto % Move to x & y |
| 372 |
10 pageLeft 25.4 mul NUMBER % pageLeft |
| 373 |
(x) show % "x" |
| 374 |
10 pageBottom 25.4 mul NUMBER % pageBottom |
| 375 |
(mm) show % "mm" |
| 376 |
|
| 377 |
% Upper-right inches |
| 378 |
pageHeight 2 mul sub % Move down... |
| 379 |
|
| 380 |
2 copy moveto % Move to x & y |
| 381 |
(Upper-Right: ) RIGHT % Label |
| 382 |
100 pageRight NUMBER % pageRight |
| 383 |
(x) show % "x" |
| 384 |
100 pageTop NUMBER % pageTop |
| 385 |
(in) show % "in" |
| 386 |
|
| 387 |
% Upper-right millimeters |
| 388 |
pageHeight sub % Move down... |
| 389 |
|
| 390 |
2 copy moveto % Move to x & y |
| 391 |
10 pageRight 25.4 mul NUMBER % pageRight |
| 392 |
(x) show % "x" |
| 393 |
10 pageTop 25.4 mul NUMBER % pageTop |
| 394 |
(mm) show % "mm" |
| 395 |
|
| 396 |
% Resolution dots-per-inch |
| 397 |
pageHeight 2 mul sub % Move down... |
| 398 |
|
| 399 |
2 copy moveto % Move to x & y |
| 400 |
(Resolution: ) RIGHT % Label |
| 401 |
1 xResolution NUMBER % xResolution |
| 402 |
(x) show % "x" |
| 403 |
1 yResolution NUMBER % yResolution |
| 404 |
(dpi) show % "dpi" |
| 405 |
|
| 406 |
% Resolution dots-per-meter |
| 407 |
pageHeight sub % Move down... |
| 408 |
|
| 409 |
moveto % Move to x & y |
| 410 |
1 xResolution 39.27 mul NUMBER % xResolution |
| 411 |
(x) show % "x" |
| 412 |
1 yResolution 39.27 mul NUMBER % yResolution |
| 413 |
(dpm) show % "dpm" |
| 414 |
|
| 415 |
% Interpreter Information... |
| 416 |
pageHeight 15 mul % Height of interpreter information |
| 417 |
|
| 418 |
pageWidth 40.5 mul % x = pageWidth * 9/16 * 72 |
| 419 |
pageHeight 35.5 mul % y = pageHeight * 1/2 * 72 |
| 420 |
2 index sub % y -= height |
| 421 |
pageWidth 28 mul % width = pageWidth * 1/4 * 72 |
| 422 |
3 index % height |
| 423 |
0.5 setgray rectfill % Draw a shadow |
| 424 |
|
| 425 |
pageWidth 40 mul % x = pageWidth * 9/16 * 72 |
| 426 |
pageHeight 36 mul % y = pageHeight * 1/2 * 72 |
| 427 |
2 index sub % y -= height |
| 428 |
pageWidth 28 mul % width = pageWidth * 3/8 * 72 |
| 429 |
3 index % height |
| 430 |
4 copy 1 setgray rectfill % Clear the box to white |
| 431 |
0 setgray rectstroke % Draw a black box around it... |
| 432 |
|
| 433 |
pop % Discard height |
| 434 |
|
| 435 |
% Label the interpreter info... |
| 436 |
pageWidth 40 mul % x = pageWidth * 9/16 * 72 |
| 437 |
pageHeight 37 mul % y = pageHeight * 1/2 * 72 |
| 438 |
moveto % Position the text |
| 439 |
mediumFont setfont % Font |
| 440 |
(Interpreter Information) show % Show the text |
| 441 |
|
| 442 |
smallFont setfont % Font |
| 443 |
pageWidth 49 mul % x = pageWidth * 11/16 * 72 |
| 444 |
pageHeight 36 mul % y = pageWidth * 1/2 * 72 |
| 445 |
pageHeight 2 mul sub % y -= 2 * smallFont height |
| 446 |
|
| 447 |
% Language level |
| 448 |
2 copy moveto % Move to x & y |
| 449 |
(PostScript: ) RIGHT % Label |
| 450 |
(Level ) show % "Level " |
| 451 |
1 languagelevel NUMBER % Language level |
| 452 |
|
| 453 |
% Version |
| 454 |
pageHeight 2 mul sub % Move down... |
| 455 |
2 copy moveto % Move to x & y |
| 456 |
(Version: ) RIGHT % Label |
| 457 |
version show % Version |
| 458 |
( \() show % " (" |
| 459 |
1 revision NUMBER % Revision |
| 460 |
(\)) show % ")" |
| 461 |
|
| 462 |
% Product |
| 463 |
pageHeight 2 mul sub % Move down... |
| 464 |
2 copy moveto % Move to x & y |
| 465 |
(Product: ) RIGHT % Label |
| 466 |
product show % Product name |
| 467 |
|
| 468 |
% Serial Number |
| 469 |
pageHeight 2 mul sub % Move down... |
| 470 |
2 copy moveto % Move to x & y |
| 471 |
(Serial #: ) RIGHT % Label |
| 472 |
1 serialnumber NUMBER % S/N |
| 473 |
|
| 474 |
% Draw the label at the top... |
| 475 |
pageWidth 36 mul % Center of page |
| 476 |
pageHeight 68 mul % Top of page (15/16ths) |
| 477 |
2 copy moveto % Position text |
| 478 |
bigFont setfont % Font |
| 479 |
(Printer Test Page) CENTER % Show text centered |
| 480 |
|
| 481 |
% Draw the copyright notice at the bottom... |
| 482 |
pageWidth 36 mul % Center of page |
| 483 |
pageHeight 10 mul % Bottom of page |
| 484 |
2 copy moveto % Position text |
| 485 |
(Printed Using CUPS v1.1.x) CENTER % Show text centered |
| 486 |
|
| 487 |
pageHeight 2 mul sub % Move down... |
| 488 |
2 copy moveto % Position text |
| 489 |
smallFont setfont % Font |
| 490 |
(Copyright 1993-2005 by Easy Software Products, All Rights Reserved.) CENTER |
| 491 |
pageHeight sub % Move down... |
| 492 |
2 copy moveto % Position text |
| 493 |
(CUPS, Easy Software Products and their logos are the trademark property of) CENTER |
| 494 |
pageHeight sub % Move down... |
| 495 |
2 copy moveto % Position text |
| 496 |
(Easy Software Products, 44141 Airport View Drive, Suite 204,) CENTER |
| 497 |
pageHeight sub % Move down... |
| 498 |
2 copy moveto % Position text |
| 499 |
(Hollywood, Maryland, 20636, USA.) CENTER |
| 500 |
|
| 501 |
% Then the CUPS logo.... |
| 502 |
gsave |
| 503 |
pageWidth 4 mul |
| 504 |
pageHeight 4 mul |
| 505 |
translate |
| 506 |
pageWidth 9 mul CUPSLOGO |
| 507 |
grestore |
| 508 |
|
| 509 |
% And the ESP logo.... |
| 510 |
gsave |
| 511 |
pageWidth 59 mul |
| 512 |
pageHeight 4 mul |
| 513 |
translate |
| 514 |
pageWidth 6 mul ESPLOGO |
| 515 |
grestore |
| 516 |
% Show the page... |
| 517 |
grestore |
| 518 |
showpage |
| 519 |
% |
| 520 |
% End of "$Id: testprint.ps,v 1.17 2005/01/03 19:29:45 mike Exp $". |
| 521 |
% |
| 522 |
%%EOF |