Setting up spooler

The spooler utility manages one printer, but you can run more than one instance of it.

When you start spooler:

If you have a file that's already in a form that the printer understands or for which there's a filter, you can print it by copying it into the raw spooling directory:

cp my_file /dev/printers/printer_name/raw

When the spooler sees the print job in /dev/printers/printer_name/raw, it copies the job file to the spooling directory, /var/spool/printers/ and invokes the appropriate filter, which prepares the file and then sends it to the printer.

Figure 1. Printing with spooler.

Normally, spooler stores a file to be printed in a directory on disk, then tells the filter where to get the file. If you need to cut down on disk memory, you can use the -F option of spooler to disable the spooling of print files. This option causes the spooler to send sections of a file to be printed directly to a FIFO buffer in piecemeal fashion; the filter receives data to be printed from the FIFO and prints that part of the file. When the buffer has been emptied, spooler loads the next section of the file into the buffer, and so on until the whole file has been printed.