Выбрать главу

Most Linux systems use PostScript as the default document format for printing. Fedora uses the gs command along with CUPS to manage local and remote print jobs and the type of data transferred during a print job. The gs command is used to translate the document stream into a format accepted by the destination printer (which most likely uses HPCL).

You can use the Ghostscript interpreter gs to display its built-in printer devices by using the gs interpreter with its --help command-line option like this:

# gs --help

NOTE

Fedora includes graphical clients you can use to view many different types of documents. For example, to display PostScript documents (including compressed PostScript documents) or PostScript images, use the gv client. To display Portable Document Format (PDF) documents, you can use gv or the xpdf client.

The gs command outputs many lines of help text on command-line usage and then lists built-in printer and graphics devices. Another way to get this information is to start gs and then use the devicenames == command like this:

# gs

GPL Ghostscript 8.60 (2007-08-01)

Copyright (C) 2007 Artifex Software, Inc. All rights reserved.

...Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF

Default output device: display

Available devices:

 alc1900 alc2000 alc4000 alc4100 alc8500 alc8600 alc9100 ap3250 appledmp

 atx23 atx24 atx38 bbox bit bitcmyk bitrgb bj10e bj10v bj10vh bj200 bjc600

 bjc800 bjc880j bjccmyk bjccolor bjcgray bjcmono bmp16 bmp16m bmp256

 bmp32b bmpa16 bmpa16m bmpa256 bmpa32b bmpamono bmpasep1 bmpasep8 bmpgray

 bmpmono bmpsep1 bmpsep8 ccr cdeskjet cdj1600 cdj500 cdj550 cdj670 cdj850

 cdj880 cdj890 cdj970 cdjcolor cdjmono cfax cgm24 cgm8 cgmmono chp2200 cif

 cljet5 cljet5c cljet5pr coslw2p coslwxl cp50 cups declj250 deskjet

 devicen dfaxhigh dfaxlow display dj505j djet500 djet500c dl2100 dnj650c

 epl2050 epl2050p epl2120 epl2500 epl2750 epl5800 epl5900 epl6100 epl6200

 eps9high eps9mid epson epsonc epswrite escp escpage faxg3 faxg32d faxg4

...

Search path:

 . : /usr/share/ghostscript/8.15/lib :

 /usr/share/ghostscript/8.15/Resource : /usr/share/ghostscript/fonts :

 /usr/share/fonts/default/ghostscript : /usr/share/fonts/default/Type1 :

 /usr/share/fonts/default/amspsfnt/pfb :

 /usr/share/fonts/default/cmpsfont/pfb : /usr/share/fonts/japanese :

 /etc/ghostscript

Not all the devices are listed in this example.

Aladdin or GNU?

At least two versions of Ghostscript are available for Linux. One version is named AFPL Ghostscript, which formerly went by the name Aladdin Ghostscript. This version is licensed under the Aladdin Free Public License, which disallows commercial distribution. The other version is called GNU Ghostscript, which is distributed under the GNU General Public License. For details about the different versions or for answers to questions regarding licensing, see the Ghostscript home page at http://www.cs.wisc.edu/~ghost/.

Creating and Configuring Local Printers

Creating a local printer for your Fedora system can be accomplished in six easy steps. You must have root permission to use the system-config-printer client. The cupsd daemon should also be running before you begin (start the daemon manually as shown earlier in this chapter, or use the ntsysv, chkconfig, or system-config-services commands to ensure that lpd is started at boot time).

To launch system-config-printer, go to System, Administration and choose the Printing menu option or use the command line of an X terminal window like this:

# system-config-printer &

Creating the Print Queue

The Fedora system-config-printer tool walks you through a process to create a new print queue, which effectively defines a new printer on your system. To begin configuration of a local (attached) printer, click the New Printer toolbar button in system-config-printer's main window. The New Printer configuration dialog appears, as shown in Figure 8.1.

FIGURE 8.1 Select the appropriate connection method for your printer and enter the relevant details.

Select the connection type that is appropriate for you. You can select a number of different connection types, depending on your specific requirements. Normally you will use the LPT#1 option if your printer is connected by a standard Parallel (or what used to be called Centronics) cable. Alternatively, if you are connecting to a printer that has a JetDirect port (most HP network-capable printers fit in this category), then select the appropriate option and enter the network address for the printer.

Next up you need to select the make/manufacturer of the printer that you are setting up, shown in Figure 8.2.

FIGURE 8.2 Select the make or manufacturer of your printer from this dialog box to help Fedora narrow down the driver options.

Note that you can configure a printer for Fedora even if it is not attached to your computer. After you select your printer's manufacturer, a list of printers from that manufacturer (such as HP, as shown in Figure 8.3) appears. Select your printer from the list, and then click the Forward button.

FIGURE 8.3 Select your printer from the list and click the Forward button to finish the configuration of a locally connected printer.

Do not worry if you do not see your printer listed in the selection; it is possible to select a related, although different, printer model and still be able to print to your printer. For example, many HP printers can be used by selecting the DeskJet 500 for monochrome or 500C model for color printing.

NOTE

You can also browse to http://www.linuxprinting.org/ to find out what drivers to use with your printer or to see a cross-referenced listing of printers supported by each driver. You might also find new and improved drivers for the latest printers on the market.