The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

3. How to print

You actually use a different command to print depending on which spooling software you use.

3.1. With PDQ

Most systems today ship with lpd, so this section won't apply. That said, I now recommend that people install and use PDQ in most cases instead of (or in addition to) lpd. PDQ just has much better support for printer options and such.

With PDQ, instead of the lpr command, you use the command pdq or xpdq. Both work much like the traditional lpr in that they will print the files you specify, or stdin if no files are given.

3.1.1. Xpdq

Xpdq is an X Windows application that shows a list of available printers and a summary of the print queue (including current and historical jobs). There are two options under the File menu, one to print specific files, and one to print stdin. You can set whatever options are defined in your printer driver from the Driver Options dialog; typically there will be duplex, resolution, paper type and size settings, and so forth.

3.1.2. Pdq

The PDQ system's command-line printing command is simply called pdq. It can be used in place of the lpr command in most situations; it accepts the -P printer specification argument. Like lpr, it prints either the listed file(s) or stdin.

Printer options can be controlled with the -o and -a options.

3.2. With LPD and the lpr command

If you've already got lpd setup to print to your printer, or your system administrator already did so, or your vendor did so for you, then all you need to do is learn how to use the lpr command. The Printing Usage HOWTO covers this, and a few other queue manipulation commands you should probably know. Or just read the lpr(1) man page.

In a nutshell, you specify the queue name with -P, and specify a filename to print a file, or nothing to print from stdin. Driver options are traditionally not controllable from lpr, but various systems accept certain options with -o, -Z, or -J.

If, however, you have a new system or new printer, then you'll have to set up printing services one way or another before you can print. Read on!

3.3. GUI Printing Tools

Most spooling systems alone offer only a rather basic command-line interface. Rather than use lpr directly, you may wish to obtain and use a front-end interface. These generally let you fiddle with various printing options (the printer, paper types, collation, n-up, etc) in an easy-to-use graphical way. Some may have other features, as well.

3.3.1. GPR

GPR, by Thomas Hubbell, uses code from CUPS to filter Postscript jobs and offer easy user control over job options. Some options (like n-way printing, page selection, etc) are implemented directly by GPR, while most others are implemented by the printer or by the spooler's filter system.

GPR works with LPD or LPRng; or can be compiled specifically for use with VA Linux's modified LPD. When compiled normally, it uses VA's libppd directly to produce printer-specific PostScript which it will then submit to the lpr command. When compiled for VA's LPD, it will submit your unmodified job PostScript to the lpr command, along with the set of job options you specify. This is arguably the better route, since it allows the Postscript to be redirected to a different printer by the spooler when appropriate; unfortunately it required VA's special LPD, which is not in wide circulation yet (although it is of course trivial to install).

To use GPR, first select a printer (by LPD queue name) and check that GPR has loaded the proper PPD file. If it hasn't, you'll need to specify the PPD filename, and specify your printer's options in the Printer Configuration dialog (you get this dialog by pressing the Printer Configuration button; it contains assorted printer setup options defined by the PPD).

Once you've configured your printer in GPR, you can print jobs by specifying the filename and selecting the proper options from the `Common' and `Advanced' tabbed panels. The `Common' options are implemented directly by GPR for all printers, while the `Advanced' options are defined by the PPD file for your printer. You can see these option panels in Figure 2 and Figure 3.

Figure 1. GPR Main Options

Figure 2. GPR Common Options

Figure 3. GPR Printer Options

3.3.2. XPP

If you use CUPS as your spooler, you can use the program XPP (see Figure 4).

To print with XPP, simply run the xpp program, and specify a file (or nothing, if you're using xpp in place of lpr to print from stdin). Then select a printer from the list of configured printers, and select any options you'd like to apply from the various tabbed panels. See Figure 5 for an example options panel highlighting the standard CUPS options.

You can save your selected printer and all the options with the `Save Settings' button.

Figure 4. XPP Main Window

Figure 5. CUPS/XPP Options Window

3.3.3. XPDQ

PDQ can be easily configured to print to queues controlled by most spooling systems, and PDQ's configuration syntax offers a very easy way to define arbitrary filtering and user options for print jobs. So you can thus use xpdq as a front-end to LPD printing with great success.

For more information, see Section 6.2.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру