Appendix D. Transition Notes

This appendix explains how application and printer driver developers can take advantage of the new features in Impressario 2.n.

The following major topics are discussed:

Notes for Application Developers

Changes that application developers should be aware of are

  • PrintPanel(1) only runs printer graphical options panels that are in the/var/spool/lp/gui_interface/ELF directory. Because IRIX 6.2 does not run COFF executables, graphical options panels in the COFF-related/var/spool/lp/gui_interface directory are ignored. This change can be seen in PrintOptionPanel.c in /usr/impressario/src/libprintui.

  • libimp(3) now supports International Color Consortium (ICC) color profiles embedded in SGI image files. It is available as a MIPS2 32-bit, a MIPS3 N32 (high performance 32-bit), or a MIPS3 64-bit library.

  • libprintui(3X) is available as a MIPS2 32-bit or MIPS3 N32 library.

See the c_dev release notes for information about 32-bit, n32 and 64-bit compilations.

Notes for Printer Driver Developers

Note: The Adobe Level II Configurable PostScript Interpreter (CPSI) is no longer included with Impressario.

Changes Affecting Model Files

For Impressario 2.n, there is an updated sample model file for HP LaserJet printers, /usr/impressario/src/models/laserjetPJL_model. The Impressario 1.2 version of the laserjet_model lp model file is still available for comparison and is found in the directory /usr/impressario/src/models. There are several major changes in the updated file:

  • Many of the printer drivers now write to standard output instead of directly to the parallel port. This allows the driver output to be piped to a device-specific driver such as phandler, which drives printers from the parallel port, or nethandler, which drives printers from network adapters such as the HP JetDirect network adapter. See the file /usr/impressario/src/models/laserjetPJL_model for examples.

  • Although lptops is still available, there is a new ASCII-text-to-PostScript filter, text2ps.

    Note: All Impressario model files now use text2ps to convert ASCII text files to PostScript and your model files should also.

    Tip: Unlike lptops, text2ps cannot print pages in reverse order. To reverse pages with text2ps, use the psselect filter. (The file type rules used by fileconvert have been updated to use psselect to do this.)

  • Starting with IRIX 6.2, the man -t command now invokes /usr/lib/print/manprint which calls lp with the -o“-manpage” option if Impressario is installed. Impressario model files have been updated to support this. You should add similar support to your reference pages.

  • As mentioned in the previous section, psrip uses a FLEXlm license. Model files should check for a valid license and disable the print spooler if one is not found. See the /usr/impressario/src/models/laserjetPJL_model file for an example.

Other changes of interest in Impressario 2.n are as follows:

  • text2pcl has been updated to support A3 and B paper sizes.

  • A bug that prevented the OPTION string in the model files from being parsed has been fixed. It is now possible for a string like

    OPTIONS=numcolors=3 gamma=1.0

    to set the numcolors, gamma, and default_profile variables when the Printer Manager is used to install the model file into /var/spool/lp/interface.

  • When using psrip, you can set the gamma value for each color channel. See the /var/spool/lp/model/deskjetII_model model file for an example.

Finally, releases of IRIX after version 6.2 will not support CTR (Compiled Type Rule) database files. Your model files may be checking for this file using code like this:

if [ ! -r /usr/lib/filetype/workspace.ctr ]; then
    disable -r”WorkSpace filetype database not built. Type `su; cd /usr/lib/filetype; make'” \
    $printer 1>>$logfile 2>&1
    exit 2

You should remove or comment out the above block of code. Future versions of fileconvert will map the old filename, workspace.ctr, to the new name, desktop.otr, to maintain backward compatibility. Even so, the file /usr/lib/filetype/workspace.ctr may not exist, so you should still remove the above code.

Changes Affecting POD Data Files

Starting with Impressario 2.0, a new logical AND operator, &, is available for font lists. Now the list of fonts on the printer can be logically AND'ed with the list of fonts on the print server, generating a list of common fonts that the graphical options panel can present to the user. The common list is important because the text2ps filter uses the font metric information of the print server fonts to determine where line breaks and page breaks should be made. The AND operator is intended for printer drivers that send PostScript directly to the printer. See Appendix C, “Printer Object Database (POD) File Formats,” for an example.

Changes Affecting Printer Drivers

Some changes that affect printer drivers are

  • The laserjet driver has been updated and renamed laserjetPJL. The source code is available in the /usr/impressario/src/drivers/laserjetPJL directory.

  • Printer drivers that use the parallel port now check only the first eight characters of the output device, instead of looking for it to be /dev/plp. This allows them to support /dev/plp1, /dev/plp11, and so on. Developers should update their drivers to behave in a similar manner.

  • Most printer drivers that directly controlled the parallel port now send output to standard output. The output is then piped to phandler or nethandler in the model file.

    Note: A general purpose driver for the serial port does not exist.

  • phandler has been updated. The source code is available in the directory /usr/impressario/src/drivers/phandler.

Another change may be necessary for drivers using nethandler. To avoid network printer timeouts, printer drivers that are meant to be used with nethandler should not send data to standard output until they read something from standard input. By waiting, the drivers can avoid initializing the printer prematurely because nethandler won't open a socket connection to the printer until it receives data from the driver via standard input.

Here is the underlying problem. When the printer driver is invoked from a model file,

image2ps image_file | psrip | printer_driver | nethandler

a delay is introduced as the programs upstream from the printer driver process the data. If the image being processed is complex, the printer driver may not see data on standard input for some time. If the printer driver sends initialization commands to the printer immediately, nethandler will open a socket connection to the printer to deliver them. Most network printers then start a timeout sequence and close the socket if they do not see any more data before the timeout expires (typically 90 seconds to 2 minutes). If the processing upstream from the printer driver takes longer than the timeout period, the socket connection will be closed by the printer and nethandler will return an error. Recovery from this is difficult because trying again will probably have the same result.

Current printer drivers probably perform this sequence of events (which risks a timeout):

parse command line
send commands to printer to initialize it
while (data to read from standard input) do
read data from input
process data and format for printer
output data to printer 

The timeout problem can be addressed by modifying the printer drivers so:

parse command line
while (data to read from standard input) do
read data from input
process data and format for printer
(if never initialized) send commands to printer to initialize it
output data to printer

Changes to the Graphical Options Panel

Tip: When a print client is configured, it copies the Graphical Printer Options Panel executable from the print server to /var/spool/lp/gui_interface/ELF. By default, IRIX 6.2 generates o32 MIPS2 ELF binaries. MIPS2 executables will not run on IRIX 5.3 systems with a MIPS R3000 processor, the configuration of many Indigo workstations. (IRIX 6.2 is not supported on R3000 systems.) Compile the Graphical Printer Options Panel under IRIX 5.3 if you wish to support IRIX 5.3 systems running on a R3000. The subsystem impr_dev.sw5_3 contains all of the Impressario 2.0 libraries compiled under IRIX 5.3. The libraries are installed in /usr/impressario/53libs and can be copied to your 5.3 development system.

All of the Graphical Printer Options Panel executables supplied in Impressario 2.0 were compiled and linked under IRIX 5.3.

The Graphical Printer Options Panel now has a context-sensitive help panel at the top of the window. This gives a short description of any option pointed to with the mouse. See the sample source code in /usr/impressario/src/gui_models/laserjetPJL.

General Changes in IRIX 6.2

Because IRIX 6.2 does not support COFF executables (IRIX 6.2 compilers cannot even generate COFF executables) developers need to ship ELF executables. They need to ship COFF executables only if they wish to support IRIX 4.0.5 systems. IRIX 6.2 includes the utility /usr/sbin/coffcheck, which warns users about the presence of COFF executables. coffcheck ignores a COFF executable in the /var/spool/lp/gui_model or /var/spool/lp/gui_interface directory if there is an ELF executable of the same name in /var/spool/lp/gui_model/ELF or /var/spool/lp/gui_interface/ELF, respectively. This arrangement allows a 6.2 print server to support a 4.0.5 print client, because a 4.0.5 client will request the COFF version of the Graphical Printer Options file.

Other features that are new with IRIX 6.2 are listed below:

  • The fonts found in the Impressario 1.2 subsystem impr_fonts.sw.adobe22 are bundled with the base operating system. They have been removed from Impressario.

  • The Printer Manager now lists SCSI devices that identify themselves as CPUs, such as certain dye-sublimation printers.

  • When a printer is being added, the Add Printers menu of the Printer Manager displays a connection type, such as SCSI, only if there is a driver installed that supports that connection type.