LPFORMS(8) | Maintenance Commands and Procedures | LPFORMS(8) |
lpforms - administer forms used with the LP print service
lpforms -f form-name option
lpforms -f form-name -A alert-type [-P paper-name [-d]]
[-Q requests] [-W minutes]
The lpforms command administers the use of preprinted forms, such as company letterhead paper, with the LP print service. A form is specified by its form-name. Users may specify a form when submitting a print request (see lp(1)). The argument all can be used instead of form-name with either of the command lines shown above. The first command line allows the administrator to add, change, and delete forms, to list the attributes of an existing form, and to allow and deny users access to particular forms. The second command line is used to establish the method by which the administrator is alerted that the form form-name must be mounted on a printer.
The following options are supported:
-f form-name
The first form of lpforms requires that one of the following options (−, -l, -F, -x) must be used:
-F pathname
−
-l
-x
The second form of the lpforms command requires the -A alert-type option. The other options are optional.
-A alert-type
-P paper-name [ -d ]
-Q requests
-W minutes
The -F pathname option is used to add a new form, form-name, to the LP print service, or to change the attributes of an existing form. The form description is taken from pathname if the -F option is given, or from the standard input if the − option is used. One of these two options must be used to define or change a form.
pathname is the path name of a file that contains all or any subset of the following information about the form.
Page length: scaled-decimal-number1 Page width: scaled-decimal-number2 Number of pages: integer Line pitch: scaled-decimal-number3 Character pitch: scaled-decimal-number4 Character set choice: character-set/print-wheel [mandatory] Ribbon color: ribbon-color Comment: comment Alignment pattern: [content-type] content
The term ``scaled-decimal-number'' refers to a non-negative number used to indicate a unit of size. The type of unit is shown by a ``trailing'' letter attached to the number. Three types of scaled decimal numbers can be used with the LP print service: numbers that show sizes in centimeters (marked with a trailing c); numbers that show sizes in inches (marked with a trailing i); and numbers that show sizes in units appropriate to use (without a trailing letter); lines, characters, lines per inch, or characters per inch.
Except for the last two lines, the above lines may appear in any order. The Comment: and comment items must appear in consecutive order but may appear before the other items, and the Alignment pattern: and the content items must appear in consecutive order at the end of the file. Also, the comment item may not contain a line that begins with any of the key phrases above, unless the key phrase is preceded with a > sign. Any leading > sign found in the comment will be removed when the comment is displayed. There is no case distinction among the key phrases.
When this command is issued, the form specified by form-name is added to the list of forms. If the form already exists, its description is changed to reflect the new information. Once added, a form is available for use in a print request, except where access to the form has been restricted, as described under the -u option. A form may also be allowed to be used on certain printers only.
A description of each form attribute is below:
Page length and Page Width
Number of pages
Line pitch and Character pitch
Character set choice
Ribbon color
Comment
Alignment pattern
When an existing form is changed with this command, items missing in the new information are left as they were. When a new form is added with this command, missing items will get the following defaults:
Page Length: 66 Page Width: 80 Number of Pages: 1 Line Pitch: 6 Character Pitch: 10 Character Set Choice: any Ribbon Color: any
LP print service" The -x option is used to delete the form form-name from the LP print service.
The -l option is used to list the attributes of the existing form form-name. The attributes listed are those described under Adding and Changing a Form, above. Because of the potentially sensitive nature of the alignment pattern, only the administrator can examine the form with this command. Other people may use the lpstat(1) command to examine the non-sensitive part of the form description.
The -u option, followed by the argument allow:login-ID-list or -u deny:login-ID-list lets you determine which users will be allowed to specify a particular form with a print request. This option can be used with the -F or − option, each of which is described above under Adding or Changing a Form.
The login-ID-list argument may include any or all of the following constructs:
login-ID
system_name!login-ID
system_name!all
all!login-ID
all
The LP print service keeps two lists of users for each form: an ``allow-list'' of people allowed to use the form, and a ``deny-list'' of people that may not use the form. With the -u allow option, the users listed are added to the allow-list and removed from the deny-list. With the -u deny option, the users listed are added to the deny-list and removed from the allow-list. (Both forms of the -u option can be run together with the -F or the − option.)
If the allow-list is not empty, only the users in the list are allowed access to the form, regardless of the content of the deny-list. If the allow-list is empty but the deny-list is not, the users in the deny-list may not use the form, (but all others may use it). All users can be denied access to a form by specifying -f deny:all. All users can be allowed access to a form by specifying -f allow:all. (This is the default.)
The -f form-name option is used with the -A alert-type option to define an alert to mount the form when there are queued jobs which need it. If this option is not used to arrange alerting for a form, no alert will be sent for that form.
The method by which the alert is sent depends on the value of the alert-type argument specified with the -A option. The alert-types are:
write
quiet
showfault
none
shell-command
list
The message sent appears as follows:
The form form-name needs to be mounted on the printer(s):printer (integer1 requests). integer2 print requests await this form. Use the ribbon-color ribbon. Use the print-wheel print wheel, if appropriate.
The printers listed are those that the administrator has specified as candidates for this form. The number integer1 listed next to each printer is the number of requests eligible for the printer. The number integer2 shown after the list of printers is the total number of requests awaiting the form. It will be less than the sum of the other numbers if some requests can be handled by more than one printer. The ribbon-color and print-wheel are those specified in the form description. The last line in the message is always sent, even if none of the printers listed use print wheels, because the administrator may choose to mount the form on a printer that does use a print wheel.
Where any color ribbon or any print wheel can be used, the statements above will read:
Use any ribbon. Use any print-wheel.
If form-name is any, the alert-type defined in this command applies to any form for which an alert has not yet been defined. If form-name is all, the alert-type defined in this command applies to all forms.
If the -W minutes option is not given, the default procedure is that only one message will be sent per need to mount the form. Not specifying the -W option is equivalent to specifying -W once or -W 0. If minutes is a number greater than 0, an alert will be sent at intervals specified by minutes.
If the -Q requests option is also given, the alert will be sent when a certain number (specified by the argument requests) of print requests that need the form are waiting. If the -Q option is not given, or the value of requests is 1 or any (which are both the default), a message is sent as soon as anyone submits a print request for the form when it is not mounted.
The -f option, followed by the -A option and the argument list is used to list the alert-type that has been defined for the specified form form-name. No change is made to the alert. If form-name is recognized by the LP print service, one of the following lines is sent to the standard output, depending on the type of alert for the form.
−
−
−
−
The phrase every minutes minutes is replaced with once if minutes (-Wminutes) is 0.
The -A quiet option is used to stop messages for the current condition. An administrator can use this option to temporarily stop receiving further messages about a known problem. Once the form has been mounted and then unmounted, messages will again be sent when the number of print requests reaches the threshold requests.
No messages will be sent after the -A none option is used until the -A option is given again with a different alert-type. This can be used to permanently stop further messages from being sent as any existing alert definition for the form will be removed.
See largefile(7) for the description of the behavior of lpforms when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
The following exit values are returned:
0
non-zero
/etc/lp/alerts/form
lp(1), lpstat(1), terminfo(5), attributes(7), largefile(7), lpadmin(8)
April 3, 1997 | OmniOS |