Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
6.  Managing Character Sets, Filters, Forms, and Fonts (Tasks) Managing Print Filters How to View Information About a Print Filter Examples--Viewing Information About a Print Filter  Previous   Contents   Next 
   
 

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.


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 can 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:

  • Disable the printer before you load the paper and mount the form.

  • Re-enable the printer when the form is ready. Otherwise, the LP print service will continue to print files that do not need the form on the printer.

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. For general information about alerts, see "Setting Up Printer Fault 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.

  • Show the attributes of the form by using the lpforms command. You can also redirect the output of the command into a file to save it for future reference.

  • Display the current status of the form by using the lpstat command. To protect potentially sensitive content, the alignment pattern is not shown.

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 might want only the people in the payroll or accounts payable department to be able to print check forms. In addition, you might 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, lp, or assume an equivalent role on the print server.

  2. Add a form that is based on a form definition.

    # 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.

    For more information, see lpforms(1M).

    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

The following example shows how to add 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. For more information, see "How to Limit Printer Access to a Form".


How to Delete a Form

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

  2. Delete the form.

    # lpforms -f form-name -x

    -f form-name

    Form to be deleted.

    -x

    Deletes the specified form.

    For more information, see lpforms(1M).

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

  3. Verify that form was deleted.

    # lpforms -f form-name -l

    You should receive an error indicating that a form by the specified name does not exist.

Example--Deleting a Form

The following example shows how to delete the medical form.

# lpforms -f medical -x

How to Unmount and Mount a Form

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

  2. Stop accepting print requests on the printer on which you are unmounting the current form.

    # reject printer-name

    printer-name

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

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

  3. Unmount the current form.

    # 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.

    # 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.

 
 
 
  Previous   Contents   Next