System Administration Guide

Managing Forms

A form is a sheet of paper on which information is printed in a predetermined format. Unlike plain paper stock, forms usually have text or graphics preprinted on them. Common examples of forms are company letterhead, invoices, blank checks, receipts, and labels.

The term form has two meanings: the physical medium (the paper) and the software that defines a form to the LP print service.

The LP print service allows you to control the use of forms. This section provides information about adding, changing, removing, mounting, and controlling access to forms.

Adding, Changing, or Deleting Forms

When you add a form, you tell the LP print service to include the form in its list of available forms. You also have to supply the information required to describe or define the form. Although you can enter such definitions when you add the form, it helps to create the definitions first and save them in files. You can then change the form definition by editing the file. See "How to Create a New Form Definition" for information about how to create form definitions.


Note -

No form definitions are supplied with the LP print service.


To change a form, you must re-add the form with a different definition.

The LP print service imposes no limit on the number of forms you can define. However, you should delete forms that are no longer appropriate. Obsolete forms may result in unnecessary processing by the print service.

Mounting Forms

To print a form, you must load the paper in the printer and use a command to mount the form, which notifies the LP print service that print requests submitted to the printer are to be printed using the form definition. If you use one printer for different types of printing, including forms, you should:

When you mount a form, make sure it is aligned properly. If an alignment pattern has been defined for the form, you can request that the pattern print repeatedly after you have mounted the form, until you have adjusted the printer so the alignment is correct.

When you want to change or discontinue using a form on a printer, you must notify the LP print service by unmounting the form.

Tracking Forms

The LP print service helps you track which forms are mounted on each printer and notifies you when it cannot find a description it needs to print a form. You are responsible for creating form descriptions and mounting and unmounting form paper in each printer, either as part of setting up a printer or in response to alerts from the LP print service.

Users can specify the form on which they want a job to print. As root, you can mount a specific form, then tell the LP print service that the form is available and on which printer it is mounted. Users can submit print requests specifying a particular form. When the LP print service receives the request, it sends an alert message to root requesting that you mount the form.

Defining Alerts for Mounting Forms

You request alerts for mounting forms in the same way you request other alerts from the LP print service. See "Setting Up Printer Fault Alerts" for general information about alerts.

Checking Forms

When you have defined a form for the LP print service, you can check it with either of two commands, depending on the type of information you want to check.

If you are not sure about the name of an existing form, you can list the contents of the /etc/lp/forms directory to see the names of the forms there.

Limiting Access to Forms

You can control which printers and users have access to some or all of the forms available on the network. For example, you may want only the people in the payroll or accounts payable department to be able to print check forms. In addition, you may want the check forms to be available only on certain printers.

To limit user access to forms, see "How to Limit User Access to a Form". To limit printer access to a form, see "How to Limit Printer Access to a Form".

How to Add a Form

  1. Log in as superuser or lp on the print server.

  2. Add a form that is based on a form definition by using the lpforms command.


    # lpforms -f form-name -F /etc/lp/forms/form
    
    -f form-name
    

    Name you choose for the form.  

    -F /etc/lp/forms/form
    

    Name of the form definition. 

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

  3. Verify that the form was added by checking for a listing of information about the form in the output of the following command.


    # lpforms -f form-name -l
    

Example--Adding a Form

In the following example, the command adds the medical form that uses the medical.fmd form definition.


# lpforms -f medical -F /etc/lp/forms/medical.fmd

Note -

Before the form can be used, one or more printers must be given access to the form. See "How to Limit Printer Access to a Form".


How to Delete a Form

  1. Log in as superuser or lp on the print server.

  2. Delete the form by using the lpforms command.


    # lpforms -f form-name -x
    
    -f form-name
    

    Form to be deleted. 

    -x

    Deletes the specified form. 

    The form is deleted from /etc/lp/forms/form-name file.

  3. Verify that form was deleted by using the following command. You should receive an error indicating that a form by the specified name does not exist.


    # lpforms -f form-name -l
    

Example--Deleting a Form

In the following example, the command deletes the medical form.


# lpforms -f medical -x

How to Unmount and Mount a Form

  1. Log in as superuser or lp on the print server.

  2. Stop accepting print requests on the printer on which you are unmounting the current form by using the reject command.


    # reject printer-name
    

    printer-name

    Name of the printer on which you are unmounting a form. 

    New print requests (which may not require the form) are not allowed to enter the printer's queue.

  3. Unmount the current form by using the lpadmin command.


    # lpadmin -p printer-name -M -f none
    

    In this command, the variable printer-name is the same as in Step 2.

    The current form is deleted from the print server's /etc/lp/printers/printer-name/configuration file.

  4. Remove the form paper from the printer.

  5. Load the form paper for the next print request.

  6. Mount the form by using the lpadmin command.


    # lpadmin -p printer-name -M -f form-name[-a -o filebreak]
    -p printer-name
    

    Printer on which you are mounting a form. 

    -M -f form-name
    

    Name of the form to be mounted. 

    -a -o filebreak 
    

    Optionally enables you to print a copy of the alignment pattern defined for the form, if it has one. 

    The specified form is added in the print server's /etc/lp/printers/printer-name/configuration file.

  7. Start accepting print requests on the printer.


    # accept printer-name
    

    The printer is ready to print the form you just mounted.

  8. Verify that the form has been mounted by checking for the form name under the Form mounted heading in the output of the following command.


    $ lpstat -p printer-name -l
    

    Otherwise, submit a print request that requires the new form and check the printer for output.

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 or lp on the print server.

  2. Set a request alert for mounting a form by using the lpadmin command.


    # 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 42-2for 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

In the following example, the command sets 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

In the following example, the command sets 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

In the following example, the command sets no request alerts for the invoice form.


# lpforms -f invoice -A none

How to View Information About a Form

  1. Log in as superuser or lp on the print server.

  2. Request information about a form by using the lpforms command.


    # 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

In the following example, the command displays 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

In the following example, the command redirects 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 by using the lpstat command.


    $ 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

In the following example, the command displays the status of the medical form.


$ lpstat -f medical,payroll
form medical is available to you

How to Limit User Access to a Form

  1. Log in as superuser or lp on the print server.

  2. Allow or deny users access to a form by using the lpforms command.


    # 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 42-4 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 42-4 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  /etc/lp/forms/form-name/deny 
    

  3. Verify the allow and deny user access lists by using the lpforms command.


    # lpforms -f form-name -l
    

Examples--Limiting User Access to a Form

In the following example, the command allows only the users nathan and marcia access to the check form.


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

In the following example, the command denies 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 or lp on the print server.

  2. Allow or deny use of forms on a printer by using the lpadmin command.


    # 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 by using the following command.


    # lpstat -p printer-name -l
    

Examples--Limiting Printer Access to a Form

In the following example, the command allows the printer luna to access only the medical, dental, and check forms.


# lpadmin -p luna -f allow:medical,dental,check

In the following example, the command denies the printer luna from accessing the medical, dental, and check forms.


# lpadmin -p luna -f deny:"medical dental payroll"