Creating a New Printer Form

When you want to provide a new form, you must define its characteristics by specifying information for nine required printer characteristics (such as page length and page width) as input to the lpforms command. The LP print service uses this information to perform the following tasks:

The form name can be anything you choose, as long as it does not contain more than 14 alphanumeric characters or any underscores. The information must use the following format:

Page length: scaled-number
Page width: scaled-number
Number of pages: integer
Line pitch: scaled-number
Character pitch: scaled-number
Character set choice: character-set-name [,mandatory]
Ribbon color: ribbon-color
Comment:
informal notes about the form
Alignment pattern: [content-type] alignment pattern

The optional word [,mandatory], means that the user cannot override the character set choice in the form. The content-type can be given, although this information is optional, with an alignment pattern. If this value is given, the print service uses it to determine, as necessary, how to filter and print the file.

Aside from following two exceptions, the information can appear in any order:

Not all of the information must be given. When you do not specify values, the default values in the following table are assigned. Before running the lpforms command, gather the following information about the new form that is described in this table.

Table 6.9. Default Values for Printer Forms

Value

Default

Description

Page length

66 lines

The length of the form, or the length of each page in a multipage form. This information can be the number of lines, or the size in inches or centimeters.

Page width

80 columns

The width of the form, in characters, inches, or centimeters.

Number of pages

1

The number of pages in a multipage form. The LP print service uses this number with a print filter (if available) to restrict the alignment pattern to a length of one form. See the description of alignment pattern below. If no filter is available, the LP print service does not truncate the output.

Line pitch

6 lines per inch

A measurement of how close lines appear on the form. Line pitch is also called leading. Character pitch is the distance between two lines, from baseline to baseline, measured by either lines per inch or lines per centimeter.

Character pitch

10 characters per inch

A measurement of how close together characters appear on the form. It is the distance between characters, measured by either characters per inch or characters per centimeter.

Character set choice

Any

The character set, print wheel, or font cartridge that should be used when this form is used. Users can choose a different character set for their own print requests when using this form. Or, you can require that only one character set be used.

Ribbon color

Any

If the form should always be printed using a certain color ribbon, the LP print service can give a mount alert message indicating which color to use.

Comment

(No default)

Any remarks that might help users understand the form. For example, the remarks could indicate the name of the form, its revision, its purpose, or restrictions on its use.

Alignment pattern

(No default)

A sample file that the LP print service uses to fill one blank form. When mounting the form, you can print this pattern on the form to align it properly. You can also define a content type for this pattern so that the print service knows how to print it.

Note

The LP print service does not try to mask sensitive information in the alignment pattern. If you do not want sensitive information printed on sample forms, for example when you align checks, then you should mask the appropriate data. The LP print service keeps the alignment pattern stored in a safe place, where only users logged in as superuser or lp user can read it.

When you have gathered the information for the form, specify it as input to the lpforms command. You should record this information first in a separate file so that you can edit it before specifying it with the lpforms command. You can then use the file as input instead of typing each piece of information separately after a prompt.

How to Create a New Printer Form Definition

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

  2. Create a form definition file.

    For a description on creating printer forms, see Creating a New Printer Form. You should save the printer definition in a text file.

  3. Add the form to the LP print service.

    # lpadmin -p printer-name -M -f form-name
    
  4. Add the form to a print server.

    For instructions, see How to Add a Form.