Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
6.  Managing Character Sets, Filters, Forms, and Fonts (Tasks) Managing Forms How to Unmount and Mount a Form  Previous   Contents   Next 
   
 

Examples--Unmounting and Mounting a Form

The following example shows the process of unmounting the currently mounted form on the printer luna.

# reject luna
destination "luna" will no longer accept requests
# lpadmin -p luna -M f none
# accept luna
destination "luna" now accepting requests

The following example shows the process of mounting the medical form on the printer luna.

# reject luna
destination "luna" will no longer accept requests
# lpadmin -p luna -M f medical -a -o filebreak
# accept luna
destination "luna" now accepting requests

How to Set an Alert to Mount a Form

  1. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Set a request alert for mounting a form.

    # lpforms -f form-name -A alert [-Q requests] [-W minutes]

    -f form-name

    Form for which you want to set a request alert.

    -A alert

    Specifies what kind of alert will occur when a form is requested. See Table 5-3 for detailed information about the valid values for alert. Some valid values are mail, write, and quiet. If you choose mail or write, a predefined alert message says to mount the specified form and includes the names of one or more printers that have been set up to use the form.

    -Q requests

    Specifies how many print requests that require the form must be in the queue to trigger an alert. If you don't specify this option, an alert occurs with just one print request in the queue.

    -W minutes

    Specifies how often (in minutes) the alert will occur. If you don't specify this option, the alert is sent once.

    The request alert is added in the print server's /etc/lp/forms/form-name/alert.sh file.

  3. Verify that the alert has been added for the form by checking the output of the following command.

    # lpforms -f form-name -A list

    Otherwise, if you have set a low number of print requests to trigger the alert, submit print requests to meet the minimum requirement and make sure you receive an alert to mount the form.

Examples--Setting an Alert to Mount a Form

The following example shows how to set email alerts to occur every five minutes for the letterhead form when there are 10 print requests for letterhead in the print queue.

# lpforms -f letterhead -A mail -Q 10 -W 5

The following example shows how to set console window alerts to occur every 10 minutes for the letterhead form when there are five requests for letterhead in the print queue.

# lpforms -f letterhead -A write -Q 5 -W 10

The following example shows how to set no request alerts for the invoice form.

# lpforms -f invoice -A none

How to View Information About a Form

  1. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Request information about a form.

    # lpforms -f form-name -l

    -f form-name

    Form for which you want to view information. Specify all for form-name to view information about all the available forms.

    -l

    Lists the specified form.

    Information about the specified form(s) is displayed.

Examples--Viewing Information About a Form

The following example shows how to display information about the medical form.

# lpforms -f medical -l
Page length: 62
Page width: 72
Number of pages: 2
Line pitch: 6
Character pitch: 12
Character set choice: pica
Ribbon color: black
Comment:
Medical claim form

The following example shows how to redirect the information about the medical form to a file. (This command creates the form definition for the form.) This is useful if a form definition gets removed unintentionally.

# lpforms -f medical -l > medical.fmd

How to View the Current Status of a Form

  1. Log in on the print server.

  2. Request information about the current status of a form.

    $ lpstat -f form-name

    -f form-name

    Form for which you want to view the current status. Specify all for form-name to view the current status of all the forms.

    Information about the current status of the specified form(s) is displayed.

Example--Viewing the Current Status of a Form

the following example shows how to display the status of the medical form.

$ lpstat -f medical
form medical is available to you

How to Limit User Access to a Form

  1. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Allow or deny users access to a form.

    # lpforms -f form-name -u allow:user-list | deny:user-list

    -f form-name

    Name of the form for which the allow or deny user access list is being created.

    -u allow:user-list

    Represents users to be added to the allow access list. Use a comma or a space to separate users' login IDs. If you use spaces, enclose the list of IDs in quotes.

    Table 5-5 provides the valid values for user-list.

    deny:user-list

    Represents users to be added to the deny user access list. Use a comma or a space to separate users' login IDs. If you use spaces, enclose the list of IDs in quotes. Table 5-5 provides the valid values for user-list.

    The specified user(s) are added to the allow or deny user access list for the specified form in one of the following files on the print server:

    /etc/lp/forms/form-name/allow or

    /etc/lp/forms/form-name/deny

  3. Verify the allow and deny user access lists.

    # lpforms -f form-name -l

Examples--Limiting User Access to a Form

The following example shows how to allow only the users nathan and marcia access to the check form.

# lpforms -f check -u allow:nathan,marcia

The following example shows how to deny users jones and smith access to the dental form.

# lpforms -f dental -u deny:"jones,smith"

How to Limit Printer Access to a Form

  1. Log in as superuser, lp, or assume an equivalent role on the print server.

  2. Allow or deny use of forms on a printer.

    # lpadmin -p printer-name -f allow:form-list | deny:form-list

    -p printer-name

    Name of the printer for which the allow or deny forms list is being created.

    -f allow:form-list | deny:form-list

    Form names to be added to the allow or deny list. Use a space or a comma to separate multiple form names. If you use spaces to separate form names, enclose the list of form names in quotes.

    The specified form(s) are added to the allow or deny forms list in one of the following files on the print server:

    /etc/lp/printers/printer-name/form.allow

    /etc/lp/printers/printer-name/form.deny

  3. Verify the allow and deny forms lists.

    # lpstat -p printer-name -l
 
 
 
  Previous   Contents   Next