1lpforms(1M) System Administration Commands lpforms(1M)
2
3
4
6 lpforms - administer forms used with the LP print service
7
9 lpforms -f form-name option
10
11
12 lpforms -f form-name -A alert-type [-P paper-name [-d]]
13 [-Q requests] [-W minutes]
14
15
17 The lpforms command administers the use of preprinted forms, such as
18 company letterhead paper, with the LP print service. A form is speci‐
19 fied by its form-name. Users may specify a form when submitting a print
20 request (see lp(1)). The argument all can be used instead of form-name
21 with either of the command lines shown above. The first command line
22 allows the administrator to add, change, and delete forms, to list the
23 attributes of an existing form, and to allow and deny users access to
24 particular forms. The second command line is used to establish the
25 method by which the administrator is alerted that the form form-name
26 must be mounted on a printer.
27
29 The following options are supported:
30
31 -f form-name Specify a form.
32
33
34
35 The first form of lpforms requires that one of the following options
36 (−, -l, -F, -x) must be used:
37
38 -F pathname To add or change form form-name, as specified by the
39 information in pathname.
40
41
42 − To add or change form form-name, as specified by the
43 information from standard input.
44
45
46 -l To list the attributes of form form-name.
47
48
49 -x To delete form form-name (this option must be used sepa‐
50 rately; it may not be used with any other option).
51
52
53
54 The second form of the lpforms command requires the -A alert-type
55 option. The other options are optional.
56
57 -A alert-type Defines an alert to mount the form when there
58 are queued jobs which need it.
59
60
61 -P paper-name [ -d ] Specify the paper name when creating the form.
62 If -d is specified, this paper is the default.
63
64
65 -Q requests An alert will be sent when a certain number of
66 print requests that need the form are waiting.
67
68
69 -W minutes An alert will be sent at intervals specified by
70 minutes.
71
72
74 Adding or Changing a Form
75 The -F pathname option is used to add a new form, form-name, to the LP
76 print service, or to change the attributes of an existing form. The
77 form description is taken from pathname if the -F option is given, or
78 from the standard input if the − option is used. One of these two
79 options must be used to define or change a form.
80
81
82 pathname is the path name of a file that contains all or any subset of
83 the following information about the form.
84
85 Page length: scaled-decimal-number1
86 Page width: scaled-decimal-number2
87 Number of pages: integer
88 Line pitch: scaled-decimal-number3
89 Character pitch: scaled-decimal-number4
90 Character set choice: character-set/print-wheel [mandatory]
91 Ribbon color: ribbon-color
92 Comment:
93 comment
94 Alignment pattern: [content-type]
95 content
96
97
98
99
100 The term ``scaled-decimal-number'' refers to a non-negative number used
101 to indicate a unit of size. The type of unit is shown by a ``trail‐
102 ing'' letter attached to the number. Three types of scaled decimal num‐
103 bers can be used with the LP print service: numbers that show sizes in
104 centimeters (marked with a trailing c); numbers that show sizes in
105 inches (marked with a trailing i); and numbers that show sizes in units
106 appropriate to use (without a trailing letter); lines, characters,
107 lines per inch, or characters per inch.
108
109
110 Except for the last two lines, the above lines may appear in any order.
111 The Comment: and comment items must appear in consecutive order but may
112 appear before the other items, and the Alignment pattern: and the con‐
113 tent items must appear in consecutive order at the end of the file.
114 Also, the comment item may not contain a line that begins with any of
115 the key phrases above, unless the key phrase is preceded with a > sign.
116 Any leading > sign found in the comment will be removed when the com‐
117 ment is displayed. There is no case distinction among the key phrases.
118
119
120 When this command is issued, the form specified by form-name is added
121 to the list of forms. If the form already exists, its description is
122 changed to reflect the new information. Once added, a form is available
123 for use in a print request, except where access to the form has been
124 restricted, as described under the -u option. A form may also be
125 allowed to be used on certain printers only.
126
127
128 A description of each form attribute is below:
129
130 Page length and Page Width
131
132 Before printing the content of a print request needing this form,
133 the generic interface program provided with the LP print service
134 will initialize the physical printer to handle pages scaled-deci‐
135 mal-number1 long, and scaled-decimal-number2 wide using the printer
136 type as a key into the terminfo(4) database. The page length and
137 page width will also be passed, if possible, to each filter used in
138 a request needing this form.
139
140
141 Number of pages
142
143 Each time the alignment pattern is printed, the LP print service
144 will attempt to truncate the content to a single form by, if possi‐
145 ble, passing to each filter the page subset of 1-integer.
146
147
148 Line pitch and Character pitch
149
150 Before printing the content of a print request needing this form,
151 the interface program provided with the LP print service will ini‐
152 tialize the physical printer to handle these pitches, using the
153 printer type as a key into the terminfo(4) database. Also, the
154 pitches will be passed, if possible, to each filter used in a
155 request needing this form. scaled-decimal-number3 is in lines-per-
156 centimeter if a c is appended, and lines-per-inch otherwise; simi‐
157 larly, scaled-decimal-number4 is in characters-per-centimeter if a
158 c is appended, and characters-per-inch otherwise. The character
159 pitch can also be given as elite (12 characters-per-inch), pica (10
160 characters-per-inch), or compressed (as many characters-per-inch as
161 possible).
162
163
164 Character set choice
165
166 When the LP print service alerts an administrator to mount this
167 form, it will also mention that the print wheel print-wheel should
168 be used on those printers that take print wheels. If printing with
169 this form is to be done on a printer that has selectable or load‐
170 able character sets instead of print wheels, the interface programs
171 provided with the LP print service will automatically select or
172 load the correct character set. If mandatory is appended, a user is
173 not allowed to select a different character set for use with the
174 form; otherwise, the character set or print wheel named is a sug‐
175 gestion and a default only.
176
177
178 Ribbon color
179
180 When the LP print service alerts an administrator to mount this
181 form, it will also mention that the color of the ribbon should be
182 ribbon-color.
183
184
185 Comment
186
187 The LP print service will display the comment unaltered when a user
188 asks about this form (see lpstat(1)).
189
190
191 Alignment pattern
192
193 When mounting this form, an administrator can ask for the content
194 to be printed repeatedly, as an aid in correctly positioning the
195 preprinted form. The optional content-type defines the type of
196 printer for which content had been generated. If content-type is
197 not given, simple is assumed. Note that the content is stored as
198 given, and will be readable only by the user lp.
199
200
201
202 When an existing form is changed with this command, items missing in
203 the new information are left as they were. When a new form is added
204 with this command, missing items will get the following defaults:
205
206 Page Length: 66
207 Page Width: 80
208 Number of Pages: 1
209 Line Pitch: 6
210 Character Pitch: 10
211 Character Set Choice: any
212 Ribbon Color: any
213
214
215
216 Deleting a Form
217 LP print service" The -x option is used to delete the form form-name
218 from the LP print service.
219
220 Listing Form Attributes
221 The -l option is used to list the attributes of the existing form
222 form-name. The attributes listed are those described under Adding and
223 Changing a Form, above. Because of the potentially sensitive nature of
224 the alignment pattern, only the administrator can examine the form
225 with this command. Other people may use the lpstat(1) command to exam‐
226 ine the non-sensitive part of the form description.
227
228 Allowing and Denying Access to a Form
229 The -u option, followed by the argument allow:login-ID-list or -u
230 deny:login-ID-list lets you determine which users will be allowed to
231 specify a particular form with a print request. This option can be used
232 with the -F or − option, each of which is described above under Adding
233 or Changing a Form.
234
235
236 The login-ID-list argument may include any or all of the following con‐
237 structs:
238
239 login-ID A user on any system
240
241
242 system_name!login-ID A user on system system_name
243
244
245 system_name!all All users on system system_name
246
247
248 all!login-ID A user on all systems
249
250
251 all All users on all systems
252
253
254
255 The LP print service keeps two lists of users for each form: an
256 ``allow-list'' of people allowed to use the form, and a ``deny-list''
257 of people that may not use the form. With the -u allow option, the
258 users listed are added to the allow-list and removed from the deny-
259 list. With the -u deny option, the users listed are added to the deny-
260 list and removed from the allow-list. (Both forms of the -u option can
261 be run together with the -F or the − option.)
262
263
264 If the allow-list is not empty, only the users in the list are allowed
265 access to the form, regardless of the content of the deny-list. If the
266 allow-list is empty but the deny-list is not, the users in the deny-
267 list may not use the form, (but all others may use it). All users can
268 be denied access to a form by specifying -f deny:all. All users can be
269 allowed access to a form by specifying -f allow:all. (This is the
270 default.)
271
272 Setting an Alert to Mount a Form
273 The -f form-name option is used with the -A alert-type option to define
274 an alert to mount the form when there are queued jobs which need it. If
275 this option is not used to arrange alerting for a form, no alert will
276 be sent for that form.
277
278
279 The method by which the alert is sent depends on the value of the
280 alert-type argument specified with the -A option. The alert-types are:
281
282 mail Send the alert message using the mail command to the
283 administrator.
284
285
286 write Write the message, using the write command, to the
287 terminal on which the administrator is logged in. If
288 the administrator is logged in on several terminals,
289 one is arbitrarily chosen.
290
291
292 quiet Do not send messages for the current condition. An
293 administrator can use this option to temporarily stop
294 receiving further messages about a known problem. Once
295 the form form-name has been mounted and subsequently
296 unmounted, messages will again be sent when the number
297 of print requests reaches the threshold specified by
298 the -Q option.
299
300
301 showfault Attempt to execute a form alert handler on each system
302 that has a print job for that form in the queue. The
303 fault handler is /etc/lp/alerts/form. It is invoked
304 with three parameters: form_name, date, file_name.
305 file_name is the name of a file containing the form
306 alert message.
307
308
309 none Do not send messages until the -A option is given
310 again with a different alert-type (other than quiet).
311
312
313 shell-command Run the shell-command each time the alert needs to be
314 sent. The shell command should expect the message in
315 standard input. If there are blank spaces embedded in
316 the command, enclose the command in quotes. Note that
317 the mail and write values for this option are equiva‐
318 lent to the values mail login-ID and write login-ID
319 respectively, where login-ID is the current name for
320 the administrator. This will be the login name of the
321 person submitting this command unless he or she has
322 used the su command to change to another login-ID. If
323 the su command has been used to change the user ID,
324 then the user-name for the new ID is used.
325
326
327 list Display the type of the alert for the form on standard
328 output. No change is made to the alert.
329
330
331
332 The message sent appears as follows:
333
334 The form form-name needs to be mounted
335 on the printer(s):printer (integer1 requests).
336 integer2 print requests await this form.
337 Use the ribbon-color ribbon.
338 Use the print-wheel print wheel, if appropriate.
339
340
341
342
343 The printers listed are those that the administrator has specified as
344 candidates for this form. The number integer1 listed next to each
345 printer is the number of requests eligible for the printer. The number
346 integer2 shown after the list of printers is the total number of
347 requests awaiting the form. It will be less than the sum of the other
348 numbers if some requests can be handled by more than one printer. The
349 ribbon-color and print-wheel are those specified in the form descrip‐
350 tion. The last line in the message is always sent, even if none of the
351 printers listed use print wheels, because the administrator may choose
352 to mount the form on a printer that does use a print wheel.
353
354
355 Where any color ribbon or any print wheel can be used, the statements
356 above will read:
357
358 Use any ribbon.
359 Use any print-wheel.
360
361
362
363
364 If form-name is any, the alert-type defined in this command applies to
365 any form for which an alert has not yet been defined. If form-name is
366 all, the alert-type defined in this command applies to all forms.
367
368
369 If the -W minutes option is not given, the default procedure is that
370 only one message will be sent per need to mount the form. Not specify‐
371 ing the -W option is equivalent to specifying -W once or -W 0. If min‐
372 utes is a number greater than 0, an alert will be sent at intervals
373 specified by minutes.
374
375
376 If the -Q requests option is also given, the alert will be sent when a
377 certain number (specified by the argument requests) of print requests
378 that need the form are waiting. If the -Q option is not given, or the
379 value of requests is 1 or any (which are both the default), a message
380 is sent as soon as anyone submits a print request for the form when it
381 is not mounted.
382
383 Listing the Current Alert
384 The -f option, followed by the -A option and the argument list is used
385 to list the alert-type that has been defined for the specified form
386 form-name. No change is made to the alert. If form-name is recognized
387 by the LP print service, one of the following lines is sent to the
388 standard output, depending on the type of alert for the form.
389
390 − When requests requests are queued: alert withshell-command
391 every minutes minutes
392
393
394 − When requests requests are queued: write to user-name every
395 minutes minutes
396
397
398 − When requests requests are queued: mail to user-name every min‐
399 utes minutes
400
401
402 − No alert
403
404
405
406 The phrase every minutes minutes is replaced with once if minutes
407 (-Wminutes) is 0.
408
409 Terminating an Active Alert
410 The -A quiet option is used to stop messages for the current condition.
411 An administrator can use this option to temporarily stop receiving fur‐
412 ther messages about a known problem. Once the form has been mounted and
413 then unmounted, messages will again be sent when the number of print
414 requests reaches the threshold requests.
415
416 Removing an Alert Definition
417 No messages will be sent after the -A none option is used until the -A
418 option is given again with a different alert-type. This can be used to
419 permanently stop further messages from being sent as any existing alert
420 definition for the form will be removed.
421
422 Large File Behavior
423 See largefile(5) for the description of the behavior of lpforms when
424 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
425
427 The following exit values are returned:
428
429 0 Successful completion.
430
431
432 non-zero An error occurred.
433
434
436 /etc/lp/alerts/form Fault handler for lpform.
437
438
440 See attributes(5) for descriptions of the following attributes:
441
442
443
444
445 ┌─────────────────────────────┬─────────────────────────────┐
446 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
447 ├─────────────────────────────┼─────────────────────────────┤
448 │Availability │SUNWpsu │
449 └─────────────────────────────┴─────────────────────────────┘
450
452 lp(1), lpstat(1), lpadmin(1M), terminfo(4), attributes(5), largefile(5)
453
454
455
456
457
458
459SunOS 5.11 3 Apr 1997 lpforms(1M)