Author: | Robert van den Aker (robert2 AT dds DOT nl) |
Version: | 2006.04.18.0 |
There are two types of printers you can add to your CUPS configuration: raw printers and filtering printers.
Raw printers are 'dumb' devices that do nothing more than spit out what they're fed. If I feed my printer a UNIX text file, i.e. one without carriage returns, through a raw queue, it prints the first line of text, sometimes part of the second line of text indented to the end of the first line (no carriage return), and then it gets stuck until I remove the print job and the sheet of paper. If I feed it a PostScript file, it prints one or one and a half lines of PostScript code, etcetera. Your printer may be different. It may print UNIX text files correctly. But then again some printers don't accept text input at all. Or it may be a PS printer and print PostScript correctly. But then you'd have to make a second printer instance to print text to the printer's text queue, if it has one. And that's just ASCII text. Now try printing an image file or a non-ASCII text file to a raw printer queue. It will take a lot of file typing and converting and raster image processing, in other words all the work that a print filter is designed to do.
On the whole, raw printers (or printer queues, really) are not very useful if you want to print from the command line or from applications on your SME Server. Other hosts on your network may also be unable to print to raw printer queues. Raw printer queues are mainly useful for Windows computers on the network that have a Windows driver for the printer installed. The driver prepares the print job in a printer-ready format and the raw printer spits it out perfectly. You can also use a raw printer queue if you have another type of network host that can prepare print jobs in printer-ready format and has a way to connect to the raw printer queue.
A filtering printer queue is a 'smart' device that uses filters to convert the input it receives to a printer-ready format before sending it on to the printer device. CUPS converts most input to PostScript (some input is directly converted to the generic raster format), then from PostScript to a generic raster format using a so-called PostScript RIP (Raster Image Processor), and then to a printer-specific raster format using printer-specific raster filters. CUPS has built-in converters for text in several character sets and formats, a large variety of image formats, PDF, and PostScript (to clean up 'dirty' PostScript and insert page count information). A filtering printer can be fed many types of input files from the SME Server's command line. It can also be shared to all kinds of hosts on your network as a pseudo-PostScript printer, which is particularly useful for papd clients (papd is the netatalk print server), because they can only see PostScript printers.
***Important***
Please note that in our configuration you cannot feed output from a raster printer driver to a filtering queue. MS Windows drivers for non-PostScript printers are examples of raster printer drivers. If you have Windows computers on your network and you want to use Windows non-PostScript drivers for your printer, you will need to set up a raw queue for the printer.
Also note that you can have as many queues as you like in front of any one physical printer. You can set up a raw queue and a (number of) filtering queue(s) for one and the same physical printer.
As discussed above, a filtering printer queue requires a filter to convert the input it receives to the kind of output that the printer understands. A conversion filter is one of the parts that make up a printer driver. A printer driver for CUPS consists of the following parts:
A so-called PPD that specifies what conversion filter is to be used to produce printer-ready output and sets various options for the conversion filter. On RHEL/CentOS/SME Server systems CUPS PPD's are installed in /usr/share/cups/model/.
A conversion filter that takes its input from one of the inbuilt CUPS filters and produces printer-ready output. Examples of this type of conversion filter are the inbuilt CUPS rastertohp and rastertoepson filters and the rastertoprinter filter from the Gimp-Print driver collection. On RHEL/CentOS/SME Server systems CUPS conversion filters are installed in /usr/lib/cups/filter/.
Optionally a specialised CUPS backend that takes its input from the conversion filter and does some special handshaking with the physical printer if so required. Examples of this type of CUPS backend are the canon and epson backends from the Gimp-Print driver collection. On RHEL/CentOS/SME Server systems CUPS backends are installed in /usr/lib/cups/backend/.
Most conversion filters will get their input from the inbuilt pstoraster filter, a filter that converts PostScript to a generic raster format. This filter requires a gs binary with the cups device built in. A suitable ghostscript package is provided and is installed with your cups package. If you only want to use the inbuilt CUPS printer drivers, that's all you need. However, most people will want to install additional printer drivers. To install additional drivers for the en locale (to have English-language PPD's installed) do (this assumes you have added the rvandenaker-cups repository to your yum configuration):
[root@hostname ~]# yum groupinstall cups-drivers-en
Alternatively, substitute "de", "es", or "fr" for "en" to have German, Spanish, or French-language PPD's installed.
Access the CUPS web interface through the printers panel in the server-manager. Accessing it this way rather than directly has the advantage that you'll already be logged into the server-manager for "synchronizing the printer lists", which you need to do after adding or deleting printers through the CUPS web interface. Log on to the CUPS web interface as "admin".
In the CUPS web interface, choose "Do Administration Tasks", then choose "Add a New Printer".
Pick a name for your printer. "Location" and "Description" are optional. Please note that the "Location" entry is meant for descriptive information about the physical location of your printer, like "Printer room" or "Cupboard upstairs" or even "Honolulu" if you do remote printing.
Press "Continue".
Choose a device.
The availability of devices depends on what so-called CUPS "backends" you have installed in /usr/lib/cups/backend/. Most standard devices come pre-installed with CUPS. I use the device "Parallel Port #1", because my printer is attached to the first parallel port. If you have a network printer with its own ethernet card or a dedicated print server device, please refer to this table for an overview of commonly used network interface settings.
Press "Continue".
Enter device settings.
For some devices you'll be asked to enter device settings, such as baud rates for serial ports. If there are default settings, accept them. They will usually work. For network printers, you'll be asked to enter the device URI. If you're unsure which setting to choose from the table, you could try something like:
socket://192.168.1.10
substituting your network printer's or print server device's IP address of course.
Press "Continue".
Choose a printer make.
What makes and models you can choose from depends on the so-called CUPS PPD's (PostScript Printer Description files, also used for non-PostScript printers in CUPS) that you have installed in /usr/share/cups/model/.
If you installed the drivers package, there should be
quite a few models to choose from.
If your printer model is not listed, please read the additional howto about adding a
special type of PPD's known as Foomatic PPD's to your CUPS
installation.
I have an HP DeskJet 400, so I would choose "HP" here.
Press "Continue".
Choose a printer model.
For my HP DeskJet 400 I can choose between a generic HP DeskJet Series model as supported by an inbuilt CUPS filter or the HP DeskJet 400 model as supported by Gimp-Print.
Press "Continue".
The printer should have been created successfully. You can follow the offered link to the printer page and print a test page if you like.
You may also want (or need!) to choose "Configure Printer" on the CUPS printer page for your printer to set some options and adjust the driver settings. For example, you will need to change the printer configuration from the default if the driver expects a color cartridge but you only have the black cartridge installed.
Now click the "Printers" link in the server-manager's left frame. The printer panel should say that your "Printer lists are out of sync". Click the "Synchronize" button to synchronize your printer lists. You should get a screen that says that the printer lists were successfully synchronized. If you now reload the printers panel by clicking "Printers" in the left frame again, the panel should say that your "Printer lists are in sync". This means that the newly added printer is being shared to your network computers through samba and papd. It's also accessible to IPP (Internet Printing Protocol) clients on your network.
Access the CUPS web interface through the printers panel in the server-manager. Accessing it this way rather than directly has the advantage that you'll already be logged into the server-manager for "synchronizing the printer lists", which you need to do after adding or deleting printers through the CUPS web interface. Log on to the CUPS web interface as "admin".
In the CUPS web interface, choose "Do Administration Tasks", then choose "Add a New Printer".
Pick a name for your printer. "Location" and "Description" are optional. Please note that the "Location" entry is meant for descriptive information about the physical location of your printer, like "Printer room" or "Cupboard upstairs" or even "Honolulu" if you do remote printing.
Press "Continue".
Choose a device.
The availability of devices depends on what so-called CUPS "backends" you have installed in /usr/lib/cups/backend/. Most standard devices come pre-installed with CUPS. I use the device "Parallel Port #1", because my printer is attached to the first parallel port. If you have a network printer with its own ethernet card or a dedicated print server device, please refer to this table for an overview of commonly used network interface settings.
Press "Continue".
Enter device settings.
For some devices you'll be asked to enter device settings, such as baud rates for serial ports. If there are default settings, accept them. They will usually work. For network printers, you'll be asked to enter the device URI. If you're unsure which setting to choose from the table, you could try something like:
socket://192.168.1.10
substituting your network printer's or print server device's IP address of course.
Press "Continue".
Choose Model/Driver Make "Raw".
Press "Continue".
Accept Model/Driver Model "Raw Queue (en)".
Press "Continue".
The printer should have been created successfully. You can follow the offered link to the printer page if you like. Please note that printing a test page will fail on non-PostScript printers. This is because you're sending a PostScript test page to the printer raw.
Now click the "Printers" link in the server-manager's left frame. The printer panel should say that your "Printer lists are out of sync". Click the "Synchronize" button to synchronize your printer lists. You should get a screen that says that the printer lists were successfully synchronized. If you now reload the printers panel by clicking "Printers" in the left frame again, the panel should say that your "Printer lists are in sync". This means that the newly added printer is being shared to your network computers through samba and papd. It's also accessible to IPP (Internet Printing Protocol) clients on your network.
This document is Copyright 2003-2006 by Robert van den Aker. It may be freely redistributed in its entirety provided that this copyright notice is not removed.