blob: d8570bf28b6a1fa9ff807762d9f83e259115e758 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
%!PS-Adobe-3.0
%%BoundingBox: 0 0 612 792
%%Pages: 1
%%LanguageLevel: 1
%%DocumentData: Clean7Bit
%%DocumentSuppliedResources: procset bannerprint/1.0
%%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
%%Creator: Michael Sweet, Easy Software Products
%%CreationDate: May 10, 2000
%%Title: Test Page
%%EndComments
%%BeginProlog
%%BeginResource procset bannerprint 1.1 0
%
% PostScript banner page for the Common UNIX Printing System ("CUPS").
%
% Copyright 1993-2005 Easy Software Products
%
% These coded instructions, statements, and computer programs are the
% property of Easy Software Products and are protected by Federal
% copyright law. Distribution and use rights are outlined in the file
% "LICENSE.txt" which should have been included with this file. If this
% file is missing or damaged please contact Easy Software Products
% at:
%
% Attn: CUPS Licensing Information
% Easy Software Products
% 44141 Airport View Drive, Suite 204
% Hollywood, Maryland 20636 USA
%
% Voice: (301) 373-9600
% EMail: cups-info@cups.org
% WWW: http://www.cups.org
%
/CENTER { % Draw centered text
% (name) CENTER -
dup stringwidth pop % Get the width of the string
0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
show % Show the string
} bind def
/RIGHT { % Draw right-justified text
% (name) RIGHT -
dup stringwidth pop % Get the width of the string
neg 0 rmoveto % Shift left the entire distance
show % Show the string
} bind def
/NUMBER { % Draw a number
% power n NUMBER -
1 index 1 eq { % power == 1?
round cvi exch pop % Convert "n" to integer
} {
1 index mul round exch div % Truncate extra decimal places
} ifelse
100 string cvs show % Convert to a string and show it...
} bind def
/CUPSLOGO { % Draw the CUPS logo
% height CUPSLOGO
% Start with a big C...
/Helvetica findfont 1 index scalefont setfont
0 setgray
0 0 moveto
(C) show
% Then "UNIX Printing System" much smaller...
/Helvetica-Bold findfont 1 index 9 div scalefont setfont
0.25 mul
dup dup 2.0 mul moveto
(UNIX) show
dup dup 1.6 mul moveto
(Printing) show
dup 1.2 mul moveto
(System) show
} bind def
/ESPLOGO { % Draw the ESP logo
% height ESPLOGO
% Compute the size of the logo...
0 0
2 index 1.5 mul 3 index
% Do the "metallic" fill from 10% black to 40% black...
1 -0.001 0 {
dup % loopval
-0.15 mul % loopval * -0.15
0.9 add % 0.9 - loopval * 0.15
setgray % set gray shade
0 % x
1 index neg % loopval
1 add % 1 - loopval
3 index % height
mul % height * (1 - loopval)
moveto % starting point
dup % loopval
3 index % width
mul % loopval * width
2 index % height
lineto % Next point
0 % x
2 index % height
lineto % Next point
closepath
fill
dup % loopval
0.15 mul % loopval * 0.15
0.6 add % 0.6 + loopval * 0.15
setgray
dup % loopval
neg 1 add % 1 - loopval
3 index % width
mul % (1 - loopval) * width
0 % y
moveto % Starting point
2 index % width
exch % loopval
2 index % height
mul % loopval * height
lineto % Next point
1 index % width
0 % y
lineto % Next point
closepath
fill
} for
0 setgray rectstroke
/Helvetica-BoldOblique findfont 1 index 3 div scalefont setfont
dup 40 div
dup 4 mul 1 index 25 mul moveto (E) show
dup 10 mul 1 index 15 mul moveto (S) show
dup 16 mul 1 index 5 mul moveto (P) show
/Helvetica-BoldOblique findfont 2 index 5 div scalefont setfont
dup 14 mul 1 index 29 mul moveto (asy) show
dup 20 mul 1 index 19 mul moveto (oftware) show
dup 26 mul 1 index 9 mul moveto (roducts) show
pop
} bind def
%%EndResource
%%EndProlog
%%Page: 1 1
gsave
% Determine the imageable area and device resolution...
initclip newpath clippath pathbbox % Get bounding rectangle
72 div /pageTop exch def % Get top margin in inches
72 div /pageRight exch def % Get right margin in inches
72 div /pageBottom exch def % Get bottom margin in inches
72 div /pageLeft exch def % Get left margin in inches
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
/boxWidth % width of text box
pageWidth pageHeight lt
{ pageWidth 54 mul }
{ pageHeight 42 mul }
ifelse def
newpath % Clear bounding path
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
% Offset page to account for lower-left margin...
pageLeft 72 mul
pageBottom 72 mul
translate
% Draw the label at the top and bottom...
0 setgray % Color
pageWidth 36 mul % Center of page
pageHeight 72 mul % Top of page
pageWidth -7 mul add % - 2 lines
moveto % Position text
bigFont setfont % Font
(Confidential) CENTER % Show text centered
pageWidth 36 mul % Center of page
pageHeight 6 mul % Bottom of page
moveto % Position text
bigFont setfont % Font
(Confidential) CENTER % Show text centered
% Job information box...
pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
0.5 setgray rectfill % Draw a shadow
pageWidth 36 mul % x = pageWidth * 1/2 * 72
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul % y = pageHeight * 1/4 * 72
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
4 copy 1 setgray rectfill % Clear the box to white
0 setgray rectstroke % Draw a black box around it...
% Job information text...
mediumFont setfont % Medium sized font
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 5 mul add % y += 2 lines
2 copy % Copy X & Y
moveto
(Job ID: ) RIGHT
moveto
({printer-name}-{job-id}) show
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 2 mul add % y += 1 line
2 copy % Copy X & Y
moveto
(Title: ) RIGHT
moveto
({job-name}) show
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -1 mul add % y -= 1 line
2 copy % Copy X & Y
moveto
(Requesting User: ) RIGHT
moveto
({job-originating-user-name}) show
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -4 mul add % y -= 2 lines
2 copy % Copy X & Y
moveto
(Billing Info: ) RIGHT
moveto
({job-billing}) show
% Then the CUPS logo....
gsave
pageWidth 4 mul
pageWidth 6 mul
translate
pageWidth 9 mul CUPSLOGO
grestore
% And the ESP logo....
gsave
pageWidth 59 mul
pageWidth 6 mul
translate
pageWidth 6 mul ESPLOGO
grestore
% Show the page...
grestore
showpage
%
% End of "$Id$".
%
%%EOF
|