DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Advanced printer configuration

Supporting PostScript printer

Support of PostScript printers is similar to support of other printers, in that the printers must be defined to the system with the lpadmin command and the appropriate software must be installed to manage them. PostScript printers may require some additional effort in supporting fonts and establishing where ``slow'' filtering occurs.

Installing and maintaining PostScript printers

PostScript printers, like other printers, are installed with the lpadmin command. They must use the PS interface program, requested by specifying -m PS on the lpadmin command line.


NOTE: The printer type and content type of a PostScript printer must be consistent with the printer type used in PostScript filters. Therefore, install your PostScript printers with a printer type of PS, PS-b, PS-r, or PS-br, and a content-type of PS.

The PS printer types serve two functions. First, they cause the print service to activate the correct fast filter to communicate with the printer. PS and PS-r are used to communicate with printers connected via a serial port; PS-b and PS-br, to communicate with printers connected via a parallel port. Second, the PS interface creates a PostScript banner page for PS printers. The banner page is printed last if the printer type is PS-r or PS-br, and the pages of the document are printed in reverse order. The printer type is specified with the -T option to the lpadmin command.

PostScript page order

Printer Connection Type Page Order
PS serial normal
PS-b parallel normal
PS-r serial reverse
PS-br parallel reverse

The -b specification (used when you select PS-b or PS-br) represents ``batch,'' which is typically used for parallel connections but may also be used for serial connections if you don't want PostScript printer status messages. The PS and PS-r printer types cannot be used for parallel connections.

By specifying the -I option of the lpadmin command when configuring a PostScript printer, you can indicate which content types are handled by the printer without slow filtering. For a printer on a server system, PS is the correct content type to enter. However, for a printer on a client system, consider where slow filtering is to occur, since network and system resource management may be of concern.

By specifying valid content types other than PS, you can force the slow filtering of input to occur on the server system. Conversely, if you specify a content type of PS, the input will be filtered locally before the print request is forwarded to the server system for fast filtering and printing.

To configure a printer on a server system:

/usr/sbin/lpadmin -p ps1 -T PS-b -I PS -m PS

To configure a printer on a client system without local filtering:

/usr/sbin/lpadmin -p ps1 -T PS-b -I simple,daisy,dmd,tek4014,plot

To configure a printer on a client system with local filtering:

/usr/sbin/lpadmin -p ps1 -T PS-b -I PS

As part of the installation procedure, you may want to install fonts on the printer or downloadable fonts on the computer. See ``Installing and maintaining PostScript fonts'' for details.

Installing and maintaining PostScript filters

PostScript filters are provided in the Advanced Commands package. The filters it provides cover the majority of situations. In certain circumstances, however, you may find it helpful to change the filter descriptions and install the filters differently. This section describes the location and function of these filters.

PostScript filters are contained in the directory /usr/lib/lp/postscript.


NOTE: There are two types of filters: fast filters and slow filters. For definitions of these types, see lpfilter(1M) and ``Defining a filter''.

A prerequisite of communication between any system and a PostScript printer is the presence of the postio or the lp.cat filter on the system. Those programs are the only mandatory PostScript filters that communicate directly with the PostScript printer. The following filters allow other types of documents to be translated to PostScript and to be printed on a PostScript printer.

PostScript filters

File Content Type Filter
simple postprint
troff dpost
daisy postdaisy
dmd postdmd
tek4014 posttek
plot postplot

The following filters perform special functions:

Special purpose filters

Function Filter
communicate with printer postio,lp.cat
download fonts download
 
reverse or select pages postreverse
matrix gray scales postmd

Installing and maintaining PostScript fonts

One of the advantages of PostScript is its ability to manage fonts. Fonts are stored in outline form in the Type 1 format, either on the printer or on a computer that communicates with a printer. When a document is printed, the PostScript interpreter generates each character as needed (in the appropriate size) from the outline description of it. If a font required for a document is not stored on the printer being used, it must be transmitted to that printer before the document can be printed. This transmission process is called ``downloading fonts.''

Fonts are stored and accessed in several ways.

The print service allows you to manage fonts in any of these ways. It provides a special download filter to manage fonts using the last method in the list.

The print service can use troff width tables for the 35 standard PostScript fonts which reside on many PostScript printers, for use by the dpost program.

Obtaining a list of printer-Resident fonts

Most PostScript printers come equipped with fonts resident in the printer ROM . Some printers have a disk on which additional fonts are stored. A list of the Type 1 fonts in ROM or on disk of an attached PostScript printer can be obtained from the printer manufacturer's documentation. For PostScript printers attached via a serial port, a list of these fonts can also be generated using the postio command and a PostScript program, romfonts.ps.

To obtain a list of printer-resident fonts for a PostScript printer attached to a serial port, do the following:

  1. Obtain the device on which the PostScript printer is connected:

    lpstat -v

    Given a system on which the PostScript printer prlocal is attached via a serial port, this would return output like:

       device for prlocal: /dev/tty01
    
    This shows the printer to be attached on device /dev/tty01.

  2. As root, execute these commands:

    cd /usr/lib/lp/postscript
    postio -L /tmp/postio.o -l /dev/tty01 -t romfonts.ps

    For our sample prlocal printer, this will produce output in the file /tmp/postio.o that looks like this:

       printer startup
       %%[ status: waiting; source: serial 25 ]%%
       %%[ status: endofjob ]%%
       %%[ status: idle ]%%
       sending file romfonts.ps
       waiting for end of job
       %%[ status: busy; source: serial 25 ]%%
       /AGaramond-Bold
       /AGaramond-BoldItalic
       /AGaramond-Italic
       /AGaramond-Regular
       /AvantGarde-Book
       /AvantGarde-BookOblique
       /AvantGarde-Demi
       /AvantGarde-DemiOblique
          . . . more PostScript font names . . .
       /ZapfChancery-MediumItalic
       /ZapfDingbats
       %%[ status: endofjob ]%%
       job complete
    

    This lists the printer-resident fonts for prlocal.

Adding printer-Resident fonts to a printer's font list

When a printer is installed, the list of printer-resident fonts should be added to the font list for that printer. This font list file can be edited to contain only the font names in the printer's memory (AGaramond-Bold through ZapfDingbats, in the previous example), and placed into the file /etc/lp/printers/prlocal/residentfonts to prevent downloading of these fonts from the host computer.

To add printer-resident fonts to a printer's font list, do the following:

  1. Navigate to the printer administration directory in which the font lists are kept. For a particular printer, this font list is contained in the file

    /etc/lp/printers/printer-name/residentfonts

    where printer-name is the name of the printer.

    With the -p option, download checks this file to see what Type 1 fonts are ROM-resident and disk-resident (some PostScript printers have directly attached fonts disks) in the printer so that it does not download such fonts.

  2. This file is not automatically created when a PostScript printer is first set up on your system using lpadmin; you may need to create this file yourself. (Font-list files must be edited manually; that is, with the help of a text editor such as vi.)

    When fonts are permanently downloaded to the printer, add the font names to this file. (This will prevent fonts from being downloaded when they are already on the printer, a time-consuming procedure.)


    NOTE: If the printer is attached to a remote system, this list should include fonts which reside on that system and are available for downloading to the printer. This prevents fonts from being transmitted unnecessarily across a network.

Installing and maintaining host-Resident fonts

Some fonts will be resident on the host and transmitted to the printer as needed for particular print requests. As the administrator, it is your job to make PostScript fonts available to all the users on a system. To do so, you must know how and where to install these fonts, using the guidelines described previously. Because fonts are requested by name and stored in files, the print service keeps a map file that shows the correspondence between the names of fonts and the names of the files containing those fonts. Both of these must be updated when fonts are installed on the host.

Retail Type 1 fonts can be installed from disk for use with XWin and lp. The fonts are installed in an XWIN directory (/usr/X/lib/fonts/type1) and the map file in /usr/share/lib/hostfontdir is updated to make their location available to download. The actual updating of the map file is done with the mkfontscale utility.

Available Type 1 fonts are the ones listed in map, a map table which consists of font name-filename pairs. The font name is the name of the PostScript Type 1 font, exactly as it appears in a %%DocumentFonts: comment and exactly as it appears in the literal /FontName in the Type 1 font program itself. The filename is the pathname of the host resident Type 1 font.

To install host-resident PostScript fonts, do the following:

  1. Copy the font file to the appropriate directory.

    The fonts available for use with PostScript printers reside in the directory /usr/share/lib/hostfontdir or other directories (for example, /usr/x/lib/fonts/type1 has fonts installed using the desktop).

  2. Add to the map table the name of the font and the name of the file in which it resides.

    Also in the hostfontdir directory, you (the administrator) must create and maintain a map table that shows the correspondence between the name assigned to each font by the foundry (the company that created the font) and the name of the file in which that font resides. A filename that begins with a / is used as is; otherwise the pathname is relative to the host font directory. Comments in the map table are introduced by % (as in PostScript) and extend to the end of the line.

    For example, to map the font called ``Palatino Bold,'' add the following line to the map table:

       Palatino-Bold /usr/share/lib/hostfontdir
    
    (The map table itself is in the file /usr/share/lib/hostfontdir/map.)

    Once this entry exists in the map table on your system, your users will be able to have a Palatino Bold font used in their print jobs. When they submit for printing a file containing a request for this font, the print service will prefix a copy of the file /usr/share/lib/hostfontdir to that file before sending it to the printer, as long as it is not defined in the residentfonts file.

  3. If you will be using troff, you must create new width tables for this font in the standard troff font directory.

Downloading host-resident fonts

The creators of the PostScript language anticipated that users would want to download fonts to printers. The PostScript Language Reference Manual (by Adobe Systems, Inc., Addison-Wesley Publishing Co., Inc., 2nd edition, 1990) states the following:

...programs that manage previously generated PostScript page descriptions, such as `printer spooler' utilities, may require additional information about those page descriptions. For example, if a page description references special fonts, a spooler may need to transmit definitions of those fonts to the PostScript printer ahead of the page description itself. To facilitate these and other operations, [PostScript] defines a standard set of structuring conventions for PostScript programs.

The download filter relies on these structuring conventions to determine which fonts must be downloaded.

When the PostScript document contains a request for fonts not loaded on the printer, the download filter manages this request. This filter is invoked as a fast filter; it downloads fonts automatically if the fonts reside on the same system as the printer. The download filter may also send fonts to a remote printer. To do this, you may create a new filter table entry which calls the download filter as a slow filter through the -y option. Alternatively, you may force selection of this filter by changing the input type.

The download filter does five things:


Next topic: Font cartridges and character sets
Previous topic: Additional PostScript capabilities provided by filters

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004