IDL Printer Setup for UNIX or Mac OS X
IDL for UNIX uses the Xprinter print technology from Bristol Technology to create and output information to a wide variety of printers. This section describes the Xprinter setup dialogs.
The Xprinter Setup Dialog
To configure a printer for use by IDL, enter the following command at the IDL command line:
The Xprinter Setup dialog allows you to select model-specific printer options such as paper trays, paper size, page orientation, and the UNIX print spooler command. Printer options are saved in the $HOME/.XprinterDefaults file. Once configured, the desired information is saved to the file system and used in future IDL sessions.
Printer Setup Dialog Buttons
The action area of the Printer Setup dialog contains six buttons:
Configuring Printer Setup Options
Specify the following options on the initial Printer Setup dialog:
To set additional options, such as selecting a different printer or changing the page size, click the Options button. The Options dialog appears.
Note
The Options dialog is only available when sending output to a printer.
Use this dialog to set the Printer Setup options:
Adding a New Printer to the List of Printer Choices
To add a new printer to your list of available printers:
Defining a New Port
To define a new port using the Printer Setup dialog:
- Display the Ports dialog. From the Printer Setup dialog, select Install, Add Printer, and Define New Port.
- Type the port definition in the Edit Port edit box. Port definitions have the following format:
- Click Add/Replace and the new port is now included in the list of current port definitions.
- Repeat the above step for each printer to which you wish to send output.
port=print_commandThe print_command is the command for sending output to the printer port. If you were to have two printers named ORION and SIRIUS for example, the definitions would appear as follows:
ORION=rsh bandit "lp -d ps" SIRIUS=rsh bandit "lp -d ps -T pcl5"Both printers here are connected to the system bandit, so the print command is a remote shell command executed on bandit. ORION is a PostScript printer, so the command
lp -d psis executed on bandit to print to ORION. SIRIUS though is a PCL5 printer, so the print command executed on bandit to print to SIRIUS islp -d ps -T pcl5.
Note
To create a printer port for each available queue on hp700 systems, click the Spooler button on the Ports dialog. This command creates a default printer port for each available printer queue returned by the lpstat -a command.
Modifying an Existing Port
In order to modify an existing port using the Printer Setup dialog:
Matching a Printer Device to a Port
In order to match a printer device to a port using the Printer Setup dialog:
- Display the Add Printer dialog. From the Printer Setup dialog, click Install and Add Printer.
- In the Printer Devices field, select the description that matches the printer you are to install. If no description matches this printer, contact your printer vendor for a printer description (PPD) file.
- Select the desired port in the Current Port Definitions list box and click Add Selected. The new printer is now included in the list of currently installed printers.
Removing an Installed Printer
In order to remove a printer device/port combination using the Printer Setup dialog:
Manually Modifying Default Printer Setup Values
Xprinter retrieves default printer setup information from the file .XprinterDefaults in your home directory. If this file does not exist, Xprinter reads the information from the file $XPHOME/xprinter/XprinterDefaults or $XPPATH/XprinterDefaults.
Note
For IDL, $XPATH is set to $IDL_DIR/resource/xprinter.
The Xprinter Printer Setup dialog writes modifications to the default information in $HOME/.XprinterDefaults. However, it never modifies the default information in the file $XPHOME/XprinterDefaults or $XPPATH/XprinterDefaults. If the file $HOME/.XprinterDefaults does not already exist, the Xprinter Printer Setup dialog creates it.
Although the most common way to modify the default Printer Setup is using the Printer Setup dialog, which updates $HOME/.XprinterDefaults automatically, you may also edit this file with any text editor and make changes directly.
You may also set up the $HOME/.XprinterDefaults file to do the following:
Defining a Port
A printer port is an alias for the print command. It is defined in the [ports] section of $HOME/.Xpdfaults and appears as part of the Printer Name in the Printer Setup dialog. For instance, the following is the first Printer Name in the Printer Setup dialog before you make any changes to $HOME/.XprinterDefaults:
For this Printer Name, FILE: is the port name. To send output to a printer instead of a file, you first must define a port for each printer to which you wish to direct output. Port entries in the [ports] section have this format:
The print_command is the command for sending output to the printer port. For instance, if you have two printers (ORION and SIRIUS), your [ports] section may appear as follows:
In the above, both printers are connected to the system bandit, so the print command is a remote shell command executed on bandit. ORION is a PostScript printer, so the command lp -d ps is executed on bandit to print to ORION. SIRIUS, though, is a PCL5 printer, and thus the print command executed on bandit to print to SIRIUS is lp -d ps -T pcl5.
If a printer is connected to your local system, you will need to add an entry for that printer as well. For the local printer, your entry should be like the following:
Your printer port can be any name you choose except FILE:, which is the only reserved port name. It causes Xprinter to create a print file formatted specifically for the specified printer type.
An entry must be created in the [ports] section for every printer to which you wish to be able to print.
Matching a Printer Type to a Defined Port
After you have defined a port for each printer, you must tell Xprinter what type of printer is associated with each port. List device types in the [devices] section of the .XprinterDefaults file. Each entry in the [devices] section has the following format:
Note
There must be a space between the PPD_file and driver and a comma between the driver and the port. The following table describes each part of this entry.
Here's an example configuring three printers:
|
Port
|
Printer Type
|
Output Type
|
|---|---|---|
| ORION |
HP LaserJet IIISi PostScript v52.3 |
PostScript |
| SIRIUS |
HP LaserJet 4M PCL Cartridge |
PCL |
| LOCAL |
QMS-PS 2200 v52.3 |
PostScript |
First, be sure to choose an alias for each printer. In order to make it simpler to identify the printer from the Printer Setup dialog you wish to use, you may use the following aliases:
It is important to note that if you utilize the Printer Setup dialog to associate ports and PPD files, you cannot specify a printer alias. You must instead choose an alias from the predefined listing that appears in the Printer Devices list box in the Add Printer dialog. The corresponding PPD file is already associated with the printer aliases in this list box.
Now, identify the PPD file associated with each of these printers.
Thus the [devices] section of the .XprinterDefaults file would be as follows:
[devices] HP LaserJet PS=HP3SI523 PostScript,ORION HP LaserJet PCL=HP4M PCL,SIRIUS QMS PS=Q2200523 PostScript,LOCAL
After these entries have been added to your .XprinterDefaults file, the following printer choices are available from the Printer Setup dialog:
Specifying a Default Printer
After you have configured all available printers, you may select one of them as the default printer. To make a specific printer the default printer on the Printer Setup dialog, add an entry (in the following format) to the [windows] section of the .XprinterDefaults file:
Simply provide the same information that you used in the [devices] section. Only the format of the entry is different; there is a comma between the PPD_file and the driver instead of a space.
For example, suppose you wish the default printer to be the printer at port ORION. The [windows] section would appear as follows:
[windows] device=HP3SI523,PostScript,ORION [ports] ORION=rsh bandit "lp -d ps" SIRIUS=rsh bandit "lp -d ps -T pcl5" LOCAL=lp -d ps [devices] HP LaserJet PS=HP3SI523 PostScript,ORION HP LaserJet PCL=HP4M PCL,SIRIUS QMS PS=Q2200523 PostScript,LOCAL
In your default .XprinterDefaults file, the [windows] entry appears:
Since no PPD file is listed (NULL), the default on the Printer Setup dialog is to print generic PostScript to a file. You may specify the filename and change the type of output to PCL on the Printer Setup dialog.
Specifying Printer-Specific Options
You may include a section that lists the default printer-specific options for each printer defined in the devices section. The options available vary between differing printers, but typical options include number of copies, page size, paper tray, and orientation. An example follows of a printer-specific section for a default printer in the example .XprinterDefaults file:
[HP3SI523,PostScript] Scale=0.80 Copies=1 PaperTray=Lower PageSize=Letter Orientation=Portrait DPI=300



