Printing from X11 Applications


Different X11 applications will have different means of printing, but most behave more or less the way you'd expect from any desktop application, as long as you've got the lpr subsystem working properly. In most cases, an application will simply present a "Generic Printer" option for printer output, pointing to an lpr command line similar to what you'd use if you were sending a file to the printer on the command line. Applications' print dialogs will vary, but because printing web pages is a fairly common task, here is an example of printing from Firefox.

To print a page you're viewing in Firefox, select File and then choose Print from the menu. The Print dialog box is shown in Figure 17.1.

Figure 17.1. The Print dialog box in Firefox. Notice that if you click the File radio button at the top, the filename will be mozilla.ps, indicating that the output is a PostScript file.


In the Print To section at the top, you can select whether you want to send the output to a printer or to a file. If you select Printer, the Printer box becomes active and you can either accept the default print spooling behavior that Firefox will use, or click Properties to modify the underlying lpr command to achieve alternative behaviors such as having it email you when it is done or print more than one copy. (See the section on lpr earlier in this chapter, as well as the man lpr page, for details.)

Most X11 programs can also output to a file. When they do, they will usually create a PostScript file that can then be sent to a PostScript printer directly or run through GhostScript and sent to a non-PostScript printer. This is an excellent way to create a snapshot of something you want to print, even if your computer doesn't have a printer available at the time; you can then print it later from the file when you do have a printer to use.

Note

Like many other UNIX programs, Firefox has no built-in printer drivers. It simply outputs a data stream in PostScript format, feeding it either to lpr or to a file. This demonstrates the need for GhostScript if you are not using a printer that understands PostScript.


Printing in OpenOffice.org

If you have OpenOffice.org installed, you can configure its default printer by double-clicking the Printer Setup icon on the desktop if it exists; if it doesn't, you can launch the utility from /usr/local/openoffice.org2.0.0/program/spadmin. You will get a dialog box showing your default ("Generic") printer, as well as buttons you can use for adding new printers, as shown in Figure 17.2.

Figure 17.2. The Printer Configuration dialog box in OpenOffice.org. Notice that OpenOffice.org has printer drivers built-in (bottom box) for many different printer models.


Because OpenOffice.org comes with a large selection of built-in drivers for various printers, it eliminates the need for using GhostScript to translate PostScript output. You can simply select your printer model from the list and follow the wizard to install it into OpenOffice.org's printer subsystem. You can then use the Properties button and other buttons in the dialog to further configure the printer, add fonts, print test pages, and more.

If you do not install a printer, OpenOffice.org uses the default Generic Printer (Default Printer), which sends PostScript output to lpr.

Tip

Even if you do have GhostScript installed, you will probably want to use one of the native drivers in OpenOffice.org insteadit may have better support for the various features of your printer than can be harnessed properly by the more generic GhostScript.


Printer Management in KDE

KDE has a built-in GUI-based printer queue viewer and management utility; you can reach it either by choosing Settings, Printing Manager from the K menu, or by entering the Control Center and then choosing Peripherals, Printers. This gives you a control panel similar to what's shown in Figure 17.3.

Figure 17.3. The Printing Manager control panel in KDE.


You can't set up or reconfigure printers from within this utility directlyprinter configuration in FreeBSD still relies on the contents of /etc/printcap, which is where KDE's printer management panel gets its printer information, just like any CLI-based application. However, it does give you the ability to view the print queues of any of your existing printers (select the printer from the top panel and then click the Jobs tab) in a graphical and interactive manner akin to similar utilities in Windows and Mac OS X. You can also use the Print System Currently Used menu to tell KDE to use alternative printing mechanisms for a given printer, such as CUPS (which will be discussed later in this chapter).

Most KDE applications use a common print dialog component called KPrinter, which lets you choose from among the printers specified in the Printing Manager utility, and perform additional in-line configurations at the time you print. A full discussion of KPrinter's capabilities can be found at http://printing.kde.org/overview/kprinter.php.




FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net