Creating a New Printer Form
When you want to provide a new form, you must define its characteristics by entering information about nine required characteristics (such as page length and page width) as input to the lpforms command. The LP print service uses this information to:
Initialize the printer so that printing is done properly on the form
Send reminders to the system administrator about how to handle the form
The form name can be anything you choose, as long as it does not contain more than 14 alphanumeric characters and underscores. The information must be in 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 phrase [,mandatory] means that the user cannot override the character set choice in the form. The content-type can be given, although this is optional, with an alignment pattern. If this attribute is given, the print service uses it to determine, as necessary, how to filter and print the file.
With two exceptions, the information can appear in any order. The exceptions are the Alignment pattern (which must always be last), and the comment (which must always follow the line with the Comment: prompt). If the comment contains a line beginning with a key phrase (like Page length, Page width , and so on), precede that line with a > character so the key phrase is not at the beginning of the line. The initial > character is stripped from the comment and is not displayed.
Not all of the information must be given. When you do not specify values for the items listed in the following table the default values are assigned. Before running the lpforms command, gather the following information about the new form:
Item | 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. This is also called leading. It 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. |
(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 those logged in as root or lp can read it.
When you have gathered the information for the form, you enter it as input to the lpforms command. You should record this information first in a separate file so you can edit it before entering 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 Form Definition
Log in as superuser, lp, or assume an equivalent role on the print server.
Create a form definition file.
For a description on creating print forms, see "Creating a New Printer Form". You should save the printer definition in a text file.
Add the form to the LP print service.
# lpadmin -p printer-name -M -f form-name
Add the form to a print server.
For instructions, see "How to Add a Form".