From f306ad4d329883820d188b71582e677b277646c7 Mon Sep 17 00:00:00 2001 From: Michael Sweet Date: Wed, 6 Dec 2017 22:43:57 -0500 Subject: Finalize printer and class information in new administration guide. Update lpadmin to copy printer-info, printer-location, and printer-geo-location from the IPP printer when using the "everywhere" driver. Update lpinfo to list the "everywhere" driver. --- doc/help/admin.html | 154 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 115 insertions(+), 39 deletions(-) (limited to 'doc') diff --git a/doc/help/admin.html b/doc/help/admin.html index b234eb419..ffe9fdca3 100644 --- a/doc/help/admin.html +++ b/doc/help/admin.html @@ -8,60 +8,136 @@

Command-Line Printer Administration

-

This help document describes how to configure and manage printers with CUPS.

+

This help document describes how to configure and manage destinations with CUPS.

-

Introduction

-

CUPS currently uses PPD (PostScript Printer Description) files that describe printer capabilities and driver programs needed for each printer. The everywhere PPD is used for nearly all modern networks printers sold since about 2009. For example, the following command creates a print queue for a printer at address 11.22.33.44: +

Introduction

+ +

Destinations are individual printers and classes (pools) of printers. Printers use a description file with one or more driver ("filter") programs that communicate with the printer through a "backend" program. CUPS currently uses PPD (PostScript Printer Description) files to describe the printer and driver programs needed, some of which come with CUPS while others come with your operating system or Linux distribution. Backends are specified using a URI (Universal Resource Identifier) where the URI scheme is the backend name, e.g., "ipp://11.22.33.44/ipp/print" specifies the "ipp" backend - like PPD files, some backends come with CUPS while others come with your operating system.

+ +

Classes are associated with one or more printers and are typically used to distribute print jobs amongst a group of printers or provide redundancy or high availability when printing. Print jobs sent to a class are forwarded to the next available printer in the class.

+ +

The lpadmin(8) program is used to add, modify, or delete destinations, while the lpinfo(8) command is used to list the available printer drivers and backends. The CUPS web interface ("http://localhost:631" or "https://servername:631") can also be used, and most operating systems provide their own GUI administration tools.

+ + +

Managing Printers

+ +

The lpadmin command is used to create, modify, or delete a printer. The -p option specifies a printer to create or modify:

+ +
lpadmin -p printername ...
+ +

The lpadmin accepts several additional options after -p printername when adding or modifying a printer:

+ +
+
-D "description"
+
Sets the description of the printer which is often shown instead of the printer name, for example "HP LaserJet".
+ +
-E
+
Enables the printer and accepts new print jobs.
+ +
-L "location"
+
Sets the location of the printer, for example "Conference Room".
+ +
-m model
+
Sets the printer driver using the model name.
+ +
-o option=value
+
Sets the named option.
+ +
-v device-uri
+
Sets the URI for the printer.
+ +
+ +

The -x option deletes the named printer:

+ +
lpadmin -x printername
-
lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
-

CUPS also includes several sample PPD files you can use for "legacy" printers:

- -
- - - - - - - - - - - - - - - - - - - -
DriverPPD Name
Dymo Label Printersdrv:///sample.drv/dymo.ppd
Intellitech Intellibardrv:///sample.drv/intelbar.ppd
EPSON 9-pin Seriesdrv:///sample.drv/epson9.ppd
EPSON 24-pin Seriesdrv:///sample.drv/epson24.ppd
Generic PCL Laser Printerdrv:///sample.drv/generpcl.ppd
Generic PostScript Printerdrv:///sample.drv/generic.ppd
HP DeskJet Seriesdrv:///sample.drv/deskjet.ppd
HP LaserJet Seriesdrv:///sample.drv/laserjet.ppd
OKIDATA 9-Pin Seriesdrv:///sample.drv/okidata9.ppd
OKIDATA 24-Pin Seriesdrv:///sample.drv/okidat24.ppd
Zebra CPCL Label Printerdrv:///sample.drv/zebracpl.ppd
Zebra EPL1 Label Printerdrv:///sample.drv/zebraep1.ppd
Zebra EPL2 Label Printerdrv:///sample.drv/zebraep2.ppd
Zebra ZPL Label Printerdrv:///sample.drv/zebra.ppd
- -

You can run the lpinfo -m command to list all of the available drivers:

+

Printer Drivers and PPDs

+ +

The -m option to lpadmin specifies the driver ("model") to use for the printer. You can run the lpinfo -m command to list all of the available drivers ("models") on your system:

lpinfo -m
-

Run the lpinfo -v command to list the available printers:

+

Each line contains the driver name followed by its description, for example:

+ +
drv:///sample.drv/dymo.ppd Dymo Label Printer
+drv:///sample.drv/epson9.ppd Epson 9-Pin Series
+drv:///sample.drv/epson24.ppd Epson 24-Pin Series
+drv:///sample.drv/generpcl.ppd Generic PCL Laser Printer
+drv:///sample.drv/generic.ppd Generic PostScript Printer
+drv:///sample.drv/deskjet.ppd HP DeskJet Series
+drv:///sample.drv/laserjet.ppd HP LaserJet Series PCL 4/5
+drv:///sample.drv/intelbar.ppd Intellitech IntelliBar Label Printer, 2.1
+drv:///sample.drv/okidata9.ppd Oki 9-Pin Series
+drv:///sample.drv/okidat24.ppd Oki 24-Pin Series
+drv:///sample.drv/zebracpl.ppd Zebra CPCL Label Printer
+drv:///sample.drv/zebraep1.ppd Zebra EPL1 Label Printer
+drv:///sample.drv/zebraep2.ppd Zebra EPL2 Label Printer
+drv:///sample.drv/zebra.ppd Zebra ZPL Label Printer
+everywhere IPP Everywhere
+ +

The everywhere driver is used for nearly all modern networks printers sold since about 2009. For example, the following command creates a destination for a printer at IP address 11.22.33.44:

+ +
lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
+ +

The CUPS sample drivers (the "drv:///sample.drv/..." lines above) can be used for "legacy" printers. For example, the following command creates a destination for a HP LaserJet printer at IP address 11.22.33.44:

+ +
lpadmin -p printername -E -v socket://11.22.33.44 -m drv:///sample.drv/laserjet.ppd
+ +
Note: The CUPS sample drivers are designed to provide basic printing capabilities for the broadest range of printers possible, but generally do not exercise the full potential of the printers or CUPS. Other drivers (including the everywhere driver) provide greater printing capabilities and better print quality.
+ + +

Device URIs (Backends)

+ +

CUPS comes with several standard backends that communicate with printers:

+ +
    +
  1. dnssd: The Bonjour (DNS-SD) protocol.
  2. +
  3. ipp: The Internet Printing Protocol (IPP) with optional encryption.
  4. +
  5. ipps: The Internet Printing Protocol with mandatory encryption.
  6. +
  7. lpd: The Line Printer Daemon protocol.
  8. +
  9. socket: The AppSocket (JetDirect) protocol.
  10. +
  11. usb: The Universal Serial Bus (USB) printer class.
  12. +
+ +

Run the lpinfo -v command to list the available backends and printers:

lpinfo -v
-

Then use the correct URI to add the printer using the lpadmin command:

+

Each line contains the backend "class" followed by the backend name or a full printer device URI, for example:

+ +
network lpd
+network ipps
+network ipp
+network socket
+network dnssd://Acme%20Laser%20Pro._ipp._tcp.local./?uuid=545253fb-1cb7-4d8d-98ed-ab6cd607cea7
+network dnssd://Bar99._printer.tcp.local./?uuid=f9efff58-9086-4c95-accb-81dee876a475
+network dnssd://Example%20EX-42._ipps._tcp.local./?uuid=4a0c67ad-2824-4ddf-9115-7d4226c5fe65
+network dnssd://Foo%20Fighter-1969._pdl-datastream._tcp.local./?uuid=4e216bea-c3de-4f65-a710-c99e11c80d2b
+direct usb://ZP/LazerJet%20MFP?serial=42
+ +

The network class of backends is used for all network protocols. The Using Network Printers help document describes how to use the standard CUPS network backends. The direct class of backends is used for directly-connected printers such as USB and Bluetooth. Because these backends use a system-specific identifier, you should only use the reported device URIs.

+ +

Once you know the correct URI for the printer, set it using the lpadmin command's -v option:

+ +
lpadmin -p printername -v device-uri
+ + +

Managing Classes

+ +

The lpadmin command is used to create, modify, or delete a class. The -c option specifies a class to create or modify and is combined with the -p option:

-
lpadmin -p printername -E -v device-uri -m ppd-name
+
lpadmin -p printername -c classname
-

Current network printers typically use ipp or ipps URIS:

+

The -r option specifies that the named printer is removed from the class:

-
lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
-lpadmin -p printername -E -v ipps://11.22.33.44/ipp/print -m everywhere
+
lpadmin -p printername -r classname
-

Older network printers typically use socket or lpd URIs:

+

The -x option deletes the named class:

-
lpadmin -p printername -E -v socket://11.22.33.44 -m ppd-name
-lpadmin -p printername -E -v lpd://11.22.33.44/ -m ppd-name
+
lpadmin -x classname
-

The sample drivers provide basic printing capabilities, but generally do not exercise the full potential of the printers or CUPS. Other drivers provide greater printing capabilities.

-- cgit v1.2.3