This software users manual describes how to use the Common UNIX Printing SystemTM ("CUPSTM") Version 1.1.15.

Document Overview

This software users manual is organized into the following sections:

Notation Conventions

Various font and syntax conventions are used in this guide. Examples and their meanings and uses are explained below:

Example     Description
    The names of commands; the first mention of a command or function in a chapter is followed by a manual page section number.
    File and directory names.
Request ID is Printer-123     Screen output.
lp -d printer filename ENTER     Literal user input; special keys like ENTER are in ALL CAPS.
12.3     Numbers in the text are written using the period (.) to indicate the decimal point.


The following abbreviations are used throughout this manual:

Other References

2 - Using the Printing System

This chapter shows you how to submit, query, and cancel print jobs to different printers.

Submitting Files for Printing

CUPS provides both the System V (lp(1)) and Berkeley (lpr(1)) printing commands. Type the following command to print a file to the default (or only) printer on the system:


CUPS understands many different types of files directly, including PostScript and image files. This allows you to print from inside your applications or at the command-line, whichever is most convenient!

Choosing a Printer

Many systems will have more than one printer available to the user. These printers can be attached to the local system via a parallel, serial, or USB port, or available over the network.

Use the lpstat(1) command to see a list of available printers:

The -p option specifies that you want to see a list of printers, and the -d option reports the current system default printer or class.

Use the -d option with the lp command to print to a specific printer:

or the -P option with the lpr command:

Setting Printer Options

For many types of files, the default printer options may be sufficient for your needs. However, there may be times when you need to change the options for a particular file you are printing.

The lp and lpr commands allow you to pass printer options using the -o option:

The available printer options vary depending on the printer. The standard options are described in Chapter 3, "Standard Printing Options".

Printing Multiple Copies

Both the lp and lpr commands have options for printing more than one copy of a file:

Copies are normally not collated for you. Use the -o Collate=True option to get collated copies :

Checking the Printer Status from the Command-Line

The lpstat command can be used to check for jobs that you have submitted for printing:

The jobs are listed in the order they will be printed. Use the -p option to see which files and printers are active:

Use the -o and -p options together to show the jobs and the printers:

Checking the Printer Status from the Web

Since CUPS uses the Internet Printing Protocol, it is also a fully-functional web server. To use your web browser to monitor the printers on your system, open the URL:

From there you can view the status of classes, jobs, and printers with the click of a button!

Canceling a Print Job

The cancel(1) and lprm(1) commands cancel a print job:

The job-id is the number that was reported to you by the lp or lpstat commands.

3 - Standard Printer Options

This chapter describes the standard printer options that are available when printing with the lp and lpr commands.

General Options

The following options apply when printing all types of files.

Selecting the Media Size, Type, and Source

The -o media=xyz option sets the media size, type, and/or source:

The available media sizes, types, and sources depend on the printer, but most support the following options (case is not significant):

The actual options supported are defined in the printer's PPD file in the PageSize, InputSlot, and MediaType options.

Setting the Orientation

The -o landscape option will rotate the page 90 degrees to print in landscape orientation:

Printing On Both Sides of the Paper

The -o sides=two-sided-short-edge and -o sides=two-sided-long-edge options will enable duplexing on the printer, if the printer supports it. The -o sides=two-sided-short-edge option is suitable for landscape pages, while the -o sides=two-sided-long-edge option is suitable for portrait pages:

The default is to print single-sided:

Banner Options

The following options apply when printing all types of files.

Selecting the Banner Page(s)

The -o jobsheets=start,end option sets the banner page(s) to use for a job:

If only one banner file is specified, it will be printed before the files in the job. If a second banner file is specified, it is printed after the files in the job.

The available banner pages depend on the local system configuration; CUPS includes the following banner files:

Document Options

The following options apply when printing all types of files.

Selecting a Range of Pages

The -o page-ranges=pages option selects a range of pages for printing:

As shown above, the pages value can be a single page, a range of pages, or a collection of page numbers and ranges separated by commas. The pages will always be printed in ascending order, regardless of the order of the pages in the page-ranges option.

The default is to print all pages.

Selecting Even or Odd Pages

Use the -o page-set=set option to select the even or odd pages:

The default is to print all pages.

N-Up Printing

The -o number-up=value option selects N-Up printing. N-Up printing places multiple document pages on a single printed page. CUPS supports 1, 2, 4, 6, 9, and 16-Up formats; the default format is 1-Up:

The -o page-border=value option chooses the border to draw around each page:

The -o number-up-layout=value option chooses the layout of the pages on each output page:

Setting the Brightness

You can control the overall brightness of the printed output using the -o brightness=percent option:

Values greater than 100 will lighten the print, while values less than 100 will darken it.

Setting the Gamma Correction

You can control the overall gamma correction of the printed output using the -o gamma=value option:

Values greater than 1000 will lighten the print, while values less than 1000 will darken it. The default gamma is 1000.

Text Options

The following options apply when printing text files.

Setting the Number of Characters Per Inch

The -o cpi=value option sets the number of characters per inch:

The default characters per inch is 10.

Setting the Number of Lines Per Inch

The -o lpi=value option sets the number of lines per inch:

The default lines per inch is 6.

Setting the Number of Columns

The -o columns=value option sets the number of text columns:

The default number of columns is 1.

Setting the Page Margins

Normally the page margins are set to the hard limits of the printer. Use the -o page-left=value, -o page-right=value, -o page-top=value, and -o page-bottom=value options to adjust the page margins:

The value argument is the margin in points; each point is 1/72 inch or 0.35mm.

Pretty Printing

The -o prettyprint option puts a header at the top of each page with the page number, job title (usually the filename), and the date. Also, C and C++ keywords are highlighted, and comment lines are italicized:

Image Options

The following options apply when printing image files.

Positioning the Image

The -o position=name option specifies the position of the image on the page:

Scaling the Image

The -o scaling=percent, -o ppi=value, and -o natural-scaling=percent options change the size of a printed image:

The scaling=percent value is a number from 1 to 800 specifying the size in relation to the page (not the image.) A scaling of 100 percent will fill the page as completely as the image aspect ratio allows. A scaling of 200 percent will print on up to 4 pages.

The ppi=value value is a number from 1 to 1200 specifying the resolution of the image in pixels per inch. An image that is 3000x2400 pixels will print 10x8 inches at 300 pixels per inch, for example. If the specified resolution makes the image larger than the page, multiple pages will be printed to satisfy the request.

The natural-scaling=percent value is a number from 1 to 800 specifying the size in relation to the natural image size. A scaling of 100 percent will print the image at its natural size, while a scaling of 50 percent will print the image at half its natural size. If the specified scaling makes the image larger than the page, multiple pages will be printed to satisfy the request.

Adjusting the Hue (Tint) of an Image

The -o hue=value option will adjust the hue of the printed image, much like the tint control on your television:

The value argument is a number from -360 to 360 and represents the color hue rotation. The following table summarizes the change you'll see with different colors:

Original hue=-45 hue=45
Red Purple Yellow-orange
Green Yellow-green Blue-green
Yellow Orange Green-yellow
Blue Sky-blue Purple
Magenta Indigo Crimson
Cyan Blue-green Light-navy-blue

The default hue adjustment is 0.

Adjusting the Saturation (Color) of an Image

The -o saturation=percent option adjusts the saturation of the colors in an image, much like the color knob on your television:

The percent argument specifies the color saturation from 0 to 200. A color saturation of 0 produces a black-and-white print, while a value of 200 will make the colors extremely intense.

The default saturation is 100.

HP-GL/2 Options

The following options apply to HP-GL/2 files.

Printing in Black

The -o blackplot option specifies that all pens should plot in black:

The default is to use the colors defined in the plot file or the standard pen colors defined in the HP-GL/2 reference manual from Hewlett Packard.

Fitting the Plot on the Page

The -o fitplot option specifies that the plot should be scaled to fit on the page:

The default is to use the absolute distances specified in the plot file.


This feature depends upon an accurate plot size (PS) command in the HP-GL/2 file. If no plot size is given in the file than the HP-GL/2 filter assumes the plot is ANSI E size.

Setting the Default Pen Width

The -o penwidth=value option specifies the default pen width for HP-GL/2 files:

The pen width value specifies the pen width in micrometers. The default value of 1000 produces lines that are 1 millimeter in width. Specifying a pen width of 0 produces lines that are exactly 1 pixel wide.


This option is ignored when the pen widths are set in the plot file.

Raw or Unfiltered Output

The -o raw option allows you to send files directly to a printer without filtering. This is sometimes required when printing from applications that provide their own "printer drivers" for your printer:

The -l option can also be used with the lpr command to send files directly to a printer:

4 - Saving Printer Options and Defaults

This chapter describes how to save printer options for your printer and set your own default printer.

Printer Options

Each printer supports a large number of options, which you learned about in Chapter 3, "Standard Printer Options". Rather than specifying these options each time you print a file, CUPS allows you to save them as "default" options for the printer.

The lpoptions(1) command saves the options for your printers. Like the lp and lpr commands, it accepts printer options using the -o argument:

Once saved, any lp or lpr command will use them when you print.

Setting Options for a Specific Printer

The previous example shows how to set the options for the default printer. The -p printer option specifies the options are for another printer:

Removing Options

The previous two examples shows how to set options for the default and a specific printer. Below, shows you how to remove the saved option using the -r argument:

Viewing the Current Defaults

The lpoptions command can also be used to show the current options by not specifying any new options on the command-line:

Viewing Options for a Specific Printer

You can display the supported options using the lpoptions command with the -l option, as follows:

Setting the Default Printer

The administrator normally will set a system-wide default printer that is normally used as the default printer by everyone. Use the -d printer option to set your own default printer:

The printer can be local (deskjet) or remote (deskjet@server).

Printer Instances

Besides setting options for each print queue, CUPS supports printer instances which allow you to define several different sets of options for each printer. You specify a printer instance using the slash (/) character:

The lp and lpr commands also understand this notation:

Removing Instances

Use the -x printer/instance option to remove a printer instance that you no longer need:

The -x option only removes the default options for that printer and instance; the original print queue will remain until deleted with the lpadmin(8) command by the administrator.

A - Software License Agreement