Printing With CUPS
Summary:
Printing I
- Printing
- XPP
- ~QtCUPS
- Command line tools
Printing
For printing with CUPS there are two comfortable graphical tools available:
xpp
qtcups
CUPS understands a lot of file formats: ~PostScript, PDF, HP-GL/2, plain text (also with accents and diacritical marks as used in French, German, Portuguese, etc.), and many image formats (JPEG etc.).
XPP
xpp
lp
lpr
At the command line print a file or standard input with
xpp {file name}
or
{command} | xpp
where
{file name}
{command}
xpp
When 'xpp' is started, a window presents a list of all available printers, a prompt line for the name of the file to print, and some additional buttons.
Choose the printer on which you want to print from the printer list and enter the names of the files to be printed on the prompt line (or leave it empty for printing from standard input). You can edit this prompt line or you can add file names using the "Browse" button. At the bottom of the window you can adjust the number of copies to print and the priority of the job. "Cancel" closes the window without printing and "Print" prints the file. The "Options" button opens the options dialog where you can set up many options to suit the printout to your needs.
In the "Options" dialog the options are dispensed on several tabs. The first three tabs are always the same, they show the printer-independent options provided by CUPS. Here you can choose which pages to print, toggle double-sided printing, 2 or 4 pages per page, adjust character size and margins for plain text printing, brightness, saturation, hue, gamma for images, and so on. Beginning from the fourth tab you will find printer-specific options, as paper trays, resolution, printout quality, and so on. The printer-specific options for ~PostScript printers are the same as under Windows or Mac Os. For other printers it depends on the configured driver which options can be found here. Some drivers offer even adjustment sliders for the colors or for the alignment of the printer heads.
You can save your preferred options with the "Save" button. With the "This printer as default" button you can set the currently chosen printer as your personal default printer.
If you run 'xpp' from your personal account, the options and default printer information is stored in the '.lpoptions' file in your home directory, so that the changes are only made for the current account. If 'xpp' is run by 'root', the default printer and option settings are stored in '/etc/cups/lpoptions', and thus apply to all users.
~QtCUPS
'~QtCUPS' fulfills the same task as xpp , in that it is also a graphical tool for printing. You start it like xpp , just type
qtcups
xpp
In contrast to 'xpp', you can't set a default printer or enter a file name, but otherwise it provides quite the same functions. The difference lies in the user interface, which closely resembles similar tools in Microsoft Windows. In the "Properties" dialog you will find all the options you can set up for your printer, but in contrast to 'xpp' all the options have an icon which illustrates what the option does. The printer-independent options for brightness, saturation, and hue even have a sample image which shows the effects of these options.
When you are using KDE's 'Konqueror' you can print files with '~QtCUPS' simply by dragging them onto the printer icon on the desktop. '~QtCUPS' is assigned to this icon by default.
Command line tools
CUPS' command line tools offer maximum compatibility to the old LPD system, allow printing from scripts and the console.
The most important command is
lpr
lpr
lpr
lpr
lpr
lpr -P {printer} {file}
What's new with CUPS'
lpr
-o
lpr -P {printer} -o page-ranges=1-4,7,9-12 -o media=Upper {file}
This command line prints only the pages 1-4, 7, and 9-12 and the paper is taken from the upper tray. You will find an overview of all printer-independent options in the CUPS Software Users Manual; for a listing of the printer-specific options, type:
lphelp {printer} | less
You can also save options as your personal defaults or set your default printer:
lpoptions -d {printer}
sets
{printer}
lpoptions -p {printer} -o media=Upper -o number-up=2
sets two pages per sheet and paper from the upper tray as default options for
{printer}
lpr
-o number-up=2
lpoptions -p {printer} -r number-up
and to remove all personal default options for
{printer}
lpoptions -x {printer}
If you are logged into your personal account, the options are stored in the '~/.lpoptions' file in your home directory. If you are logged in as 'root', the options are stored in '/etc/cups/lpoptions', the file for system-wide defaults.
For further information on these commands enter
man lpr
man lpoptions
Related Resources:
See Resources on article index
Modified: Nov 20, 2000
Author: Till Kamppeter
Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
Version 1.3 last modified by AdminWiki on 22/03/2004 at 09:44
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!