UNIX System Administration Handbook - Evi Nemeth [417]
PostScript is actually a full-fledged programming language. You can read PostScript programs with a text editor or more. The programs contain a multitude of parentheses, curly braces, and slashes and often start with the characters %!PS. Although these starting characters are not required by the language itself, some versions of the UNIX printing software look for them when attempting to classify print jobs.
PCL
Printer Command Language is HP’s alternative to PostScript. It’s found almost exclusively on HP printers and is quite common in the PC world. UNIX applications usually cannot generate PCL, so they require a filter to convert other formats.
23.2 TYPES OF PRINTERS
UNIX lets you spool jobs to almost any type of printer. At the most basic level, printers are classified by their connection interface (network, serial, parallel) and by the type of data they understand (text, PostScript, PCL, or something else entirely).
Many of the “el cheapo” printers used on Windows systems (known collectively as WinPrinters) cannot be used with UNIX. These printers have very little built-in intelligence and cannot understand any PDL. Some of the information necessary to communicate with these printers is hidden in proprietary driver code. Such secrecy frustrates efforts to develop UNIX support for these devices.
Serial and parallel printers
Serial printers require a mess of extra configuration. For basic information about serial ports, see 7, Serial Devices. The spooler software needs to know the appropriate values for the baud rate and other serial options so that it can communicate properly with the printer. Refer to your printing system’s on-line man pages for information on how to specify these details.
Parallel ports are faster than standard serial ports, and fortunately for sysadmins, fewer options need be configured. Although the standard has not aged gracefully, it does provide us with ports that require relatively little tinkering. Under Linux, the first (and usually only) parallel port is /dev/parport0; FreeBSD uses /dev/lpt0.
A faster and better serial technology called the Universal Serial Bus (USB) is just making its way into the UNIX world. USB has become wildly popular under Windows, but UNIX support has taken a while to arrive. At the time of this writing, the latest stable releases of FreeBSD and Linux are finally starting to offer USB support.
Network printers
Some printers contain full-fledged network interfaces, which allow them to sit directly on a network and accept jobs through one or more network or printing protocols. Data can be sent to network-attached printers much more quickly than it can be sent to printers on serial or parallel ports.
Because any computer on the network can potentially spool directly to the network printer, contention issues arise. There is often a lack of administrative control.
To simplify administration, you should try to set up your network so that a few hosts control all of your printers. Other machines should simply transmit jobs to these print server machines. This setup can save you work because you will not have to keep a close eye on the printing system on every machine. In addition, you will have relatively few configurations to investigate when a printing problem occurs.
Many network laser printers include an lpd server that runs inside the printer. This feature allows UNIX clients to spool files to the printer in exactly the same manner they would spool files to a BSD server. Since all of our reference operating systems can spool to an lpd server, we like these printers a lot.
Older network printers required that print jobs be sent to TCP port 9100. This configuration is difficult to support with the BSD and SysV printing systems, but it’s easy with LPRng. If you have this kind of printer, we strongly recommend that you read about LPRng starting on page 735.
Life without PostScript
PostScript printers are naturally supported by UNIX printing systems, and configuration of these printers is relatively easy.