[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts

Adding a New Printer Type to Your System

To add an unsupported printer to your system, you must add a new Printer definition to the printer directories. For more complicated scenarios, you might also need to add a new printer-specific formatter to the printer backend.

"Example of Print Formatter" in AIX Version 4.3 Guide to Printers and Printing shows how the print formatter interacts with the printer formatter subroutines.

Additional Steps for Adding a New Printer Type

However, if you want the new Printer definition to carry the name of the new printer, you must develop a new Predefined definition to carry the new printer information besides adding a new Printer definition. Use the piopredef command to do this.

Steps for adding a new printer-specific formatter to the printer backend are discussed in "Adding a Printer Formatter to the Printer Backend". "Example of Print Formatter" in AIX Version 4.3 Guide to Printers and Printing shows how print formatters can interact with the printer formatter subroutines.

Note: These instructions apply to the addition of a new printer definition to the system, not to the addition of a physical printer device itself. For information on adding a new printer device, refer to device configuration and management. If your new printer requires an interface other than the parallel or serial interface provided by the operating system, you must also provide a new device driver.

If the printer being added does not emulate a supported printer or if it emulates several data streams, you need to make more changes to the Printer definition. It is simpler to make the necessary changes for these printers by editing the printer colon file. See "Adding a Printer Using the Printer Colon File" in AIX Version 4.3 Guide to Printers and Printing.

Modifying Printer Attributes

Edit the customized file ( /var/spool/lpd/pio/custom /var/spool/lpd/pio/@local/custom QueueName:QueueDeviceName ), adding or changing the printer attributes to match the new printer.

For example, assume that you created a new file based on the existing 4201-3 printer. The customized file for the 4201-3 printer contains the following template that the printer formatter uses to initialize the printer:

%I[ez,em,eA,cv,eC,eO,cp,cc, . . .

The formatter fills in the string as directed by this template and sends the resulting sequence of commands to the 4201-3 printer. Specifically, this generates a string of escape sequences that initialize the printer and set such parameters as vertical and horizontal spacing and page length. You would construct a similar command string to properly initialize the new printer and put it into 4201-emulation mode. While many of the escape sequences might be the same, at least one will be different: the escape sequence that is the command to put the printer into the specific printer-emulation mode. Assume that you added an ep attribute that specifies the string to initialize the printer to 4201-3 emulation mode, as follows:

\033\012\013

The Printer Initialization field will then be:

%I[ep,ez,em,eA,cv,eC,eO,cp,cc, . . .

You must create a virtual printer for each printer-emulation mode you want to use. See "Real and Virtual Printers" in AIX Version 4.3 Guide to Printers and Printing.

Related Information

Printer Backends.

Example of Print Formatter.

Adding a Printer Definition.


[ Previous | Next | Contents | Home | Search ]