Programmer Reference : Common Printing : Setting up printers and queues on UNIX platforms
Setting up printers and queues on UNIX platforms
Note:
The strings for the CwPrinterPrompter are read from the X resource database. To change or translate these strings, you must add entries for your user id into the .Xdefaults file. You can find sample entries in the /usr/local/VASTPlatform/11.0.1x86/app-defaults/ENVY directory. For more information about the .Xdefaults file, see the documentation for your X server .
To direct the output of the Common Printing subsystem to a printer, you must first configure the system to recognize any available printers and queues. Printer definitions are installed through the CwPrinterPrompter. Install printer definitions as follows:
1. Open the printer prompter by executing the following code in a workspace:
CwPrinterPrompter new prompt
2. When the prompter opens, select Install. A Printer Installation dialog will appear, listing any configured printers. This list should contain one installed printer, which may be used as an example. After installing any additional printers, this printer can be deleted.
3. To install a new printer, select Add Printer. A dialog appears, listing the available printer types and currently configured ports. A connection to a printer is specified by a combination of a PostScript printer definition (PPD) and a port definition.
4. Select Define New Port to create a new port definition. A dialog appears, allowing you to edit port definitions. Type the port definition in the Edit Port input area. Port definitions have the following format:
5. port=print_command
The port is any string which users will recognize as referring to a particular printer. The print_command is the command used for sending output to the printer port (for example, lp -d or lpr -P. For example, suppose you have two printers, ADMIN and LAB. Your definitions might look like the following:
ADMIN=rsh bandit "lp -d ps"
LAB=lpr -Pgonzo
In this example, ADMIN refers to a printer connected to the system BANDIT, so the print command is a remote shell command executed on BANDIT. ADMIN is a PostScript printer attached to a queue named PS, so the command lp -d ps is executed on BANDIT to print to ADMIN. LAB, however, prints to a printer on the local system, so the print command executed locally to print to LAB is lpr -Pgonzo, where GONZO specifies the defined PostScript printer queue name.
Note:
Some systems use lp -dqueuename to send output to the printer; others use lpr -Pqueuename. You should specify whatever command is appropriate to generate printed output on your system.
6. Select Add/Replace to add the new port in the list of current port definitions.
7. Repeat for each printer you want to send output to.
Note:
To modify an existing port using the Printer Setup dialog, select the port you want to modify and edit the port information in the Edit Port input area, then select Add/Replace.
8. In the Printer Devices field, select the description that matches the printer you are installing. If no description matches your printer, contact your printer vendor for a PPD file.
9. Select the desired port in the Current Port Definitions list box and select Add Selected. The new printer is now included in the list of currently installed printers.
To close any dialog without accepting the changes, select Cancel. To close a dialog and accept the changes, select Dismiss.
Last modified date: 02/27/2021