xref: /aosp_15_r20/external/libcups/README.md (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard WorkerREADME - Apple CUPS v2.3.6 - 2022-05-25
2*5e7646d2SAndroid Build Coastguard Worker=======================================
3*5e7646d2SAndroid Build Coastguard Worker
4*5e7646d2SAndroid Build Coastguard Worker> Note: Apple CUPS is the version of CUPS that is shipped with macOS and iOS.
5*5e7646d2SAndroid Build Coastguard Worker> For the current version of CUPS that is used on other operating systems, see
6*5e7646d2SAndroid Build Coastguard Worker> <https://openprinting.github.io/cups> for details.
7*5e7646d2SAndroid Build Coastguard Worker
8*5e7646d2SAndroid Build Coastguard Worker
9*5e7646d2SAndroid Build Coastguard WorkerINTRODUCTION
10*5e7646d2SAndroid Build Coastguard Worker------------
11*5e7646d2SAndroid Build Coastguard Worker
12*5e7646d2SAndroid Build Coastguard WorkerCUPS is a standards-based, open source printing system developed by Apple Inc.
13*5e7646d2SAndroid Build Coastguard Workerfor macOS® and other UNIX®-like operating systems.  CUPS uses the Internet
14*5e7646d2SAndroid Build Coastguard WorkerPrinting Protocol ("IPP") and provides System V and Berkeley command-line
15*5e7646d2SAndroid Build Coastguard Workerinterfaces, a web interface, and a C API to manage printers and print jobs.  It
16*5e7646d2SAndroid Build Coastguard Workersupports printing to both local (parallel, serial, USB) and networked printers,
17*5e7646d2SAndroid Build Coastguard Workerand printers can be shared from one computer to another, even over the Internet!
18*5e7646d2SAndroid Build Coastguard Worker
19*5e7646d2SAndroid Build Coastguard WorkerInternally, CUPS uses PostScript Printer Description ("PPD") files to describe
20*5e7646d2SAndroid Build Coastguard Workerprinter capabilities and features and a wide variety of generic and device-
21*5e7646d2SAndroid Build Coastguard Workerspecific programs to convert and print many types of files.  Sample drivers are
22*5e7646d2SAndroid Build Coastguard Workerincluded with CUPS to support many Dymo, EPSON, HP, Intellitech, OKIDATA, and
23*5e7646d2SAndroid Build Coastguard WorkerZebra printers.  Many more drivers are available online and (in some cases) on
24*5e7646d2SAndroid Build Coastguard Workerthe driver CD-ROM that came with your printer.
25*5e7646d2SAndroid Build Coastguard Worker
26*5e7646d2SAndroid Build Coastguard WorkerCUPS is licensed under the Apache License Version 2.0.  See the file
27*5e7646d2SAndroid Build Coastguard Worker"LICENSE" for more information.
28*5e7646d2SAndroid Build Coastguard Worker
29*5e7646d2SAndroid Build Coastguard Worker
30*5e7646d2SAndroid Build Coastguard WorkerREADING THE DOCUMENTATION
31*5e7646d2SAndroid Build Coastguard Worker-------------------------
32*5e7646d2SAndroid Build Coastguard Worker
33*5e7646d2SAndroid Build Coastguard WorkerInitial documentation to get you started is provided in the root directory of
34*5e7646d2SAndroid Build Coastguard Workerthe CUPS sources:
35*5e7646d2SAndroid Build Coastguard Worker
36*5e7646d2SAndroid Build Coastguard Worker- `CHANGES.md`: A list of changes in the current major release of CUPS.
37*5e7646d2SAndroid Build Coastguard Worker- `CONTRIBUTING.md`: Guidelines for contributing to the CUPS project.
38*5e7646d2SAndroid Build Coastguard Worker- `CREDITS.md`: A list of past contributors to the CUPS project.
39*5e7646d2SAndroid Build Coastguard Worker- `DEVELOPING.md`: Guidelines for developing code for the CUPS project.
40*5e7646d2SAndroid Build Coastguard Worker- `INSTALL.md`: Instructions for building and installing CUPS.
41*5e7646d2SAndroid Build Coastguard Worker- `LICENSE`: The CUPS license agreement (Apache 2.0).
42*5e7646d2SAndroid Build Coastguard Worker- `NOTICE`: Copyright notices and exceptions to the CUPS license agreement.
43*5e7646d2SAndroid Build Coastguard Worker- `README.md`: This file.
44*5e7646d2SAndroid Build Coastguard Worker
45*5e7646d2SAndroid Build Coastguard WorkerOnce you have installed the software you can access the documentation (and a
46*5e7646d2SAndroid Build Coastguard Workerbunch of other stuff) online at <http://localhost:631/> and using the `man`
47*5e7646d2SAndroid Build Coastguard Workercommand, for example `man cups`.
48*5e7646d2SAndroid Build Coastguard Worker
49*5e7646d2SAndroid Build Coastguard WorkerIf you're having trouble getting that far, the documentation is located under
50*5e7646d2SAndroid Build Coastguard Workerthe `doc/help` and `man` directories.
51*5e7646d2SAndroid Build Coastguard Worker
52*5e7646d2SAndroid Build Coastguard WorkerPlease read the documentation before asking questions.
53*5e7646d2SAndroid Build Coastguard Worker
54*5e7646d2SAndroid Build Coastguard Worker
55*5e7646d2SAndroid Build Coastguard WorkerGETTING SUPPORT AND OTHER RESOURCES
56*5e7646d2SAndroid Build Coastguard Worker-----------------------------------
57*5e7646d2SAndroid Build Coastguard Worker
58*5e7646d2SAndroid Build Coastguard WorkerIf you have problems, *read the documentation first!*  We also provide two
59*5e7646d2SAndroid Build Coastguard Workermailing lists which are available at <https://lists.cups.org/mailman/listinfo>.
60*5e7646d2SAndroid Build Coastguard Worker
61*5e7646d2SAndroid Build Coastguard WorkerSee the CUPS web site at <https://www.cups.org/> for other resources.
62*5e7646d2SAndroid Build Coastguard Worker
63*5e7646d2SAndroid Build Coastguard Worker
64*5e7646d2SAndroid Build Coastguard WorkerSETTING UP PRINTER QUEUES USING YOUR WEB BROWSER
65*5e7646d2SAndroid Build Coastguard Worker------------------------------------------------
66*5e7646d2SAndroid Build Coastguard Worker
67*5e7646d2SAndroid Build Coastguard WorkerCUPS includes a web-based administration tool that allows you to manage
68*5e7646d2SAndroid Build Coastguard Workerprinters, classes, and jobs on your server.  Open <http://localhost:631/admin/>
69*5e7646d2SAndroid Build Coastguard Workerin your browser to access the printer administration tools:
70*5e7646d2SAndroid Build Coastguard Worker
71*5e7646d2SAndroid Build Coastguard Worker*Do not* use the hostname for your machine - it will not work with the default
72*5e7646d2SAndroid Build Coastguard WorkerCUPS configuration.  To enable administration access on other addresses, check
73*5e7646d2SAndroid Build Coastguard Workerthe `Allow Remote Administration` box and click on the `Change Settings` button.
74*5e7646d2SAndroid Build Coastguard Worker
75*5e7646d2SAndroid Build Coastguard WorkerYou will be asked for the administration password (root or any other user in the
76*5e7646d2SAndroid Build Coastguard Worker"sys", "system", "root", "admin", or "lpadmin" group on your system) when
77*5e7646d2SAndroid Build Coastguard Workerperforming any administrative function.
78*5e7646d2SAndroid Build Coastguard Worker
79*5e7646d2SAndroid Build Coastguard Worker
80*5e7646d2SAndroid Build Coastguard WorkerSETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
81*5e7646d2SAndroid Build Coastguard Worker-----------------------------------------------
82*5e7646d2SAndroid Build Coastguard Worker
83*5e7646d2SAndroid Build Coastguard WorkerCUPS currently uses PPD (PostScript Printer Description) files that describe
84*5e7646d2SAndroid Build Coastguard Workerprinter capabilities and driver programs needed for each printer.  The
85*5e7646d2SAndroid Build Coastguard Worker`everywhere` PPD is used for nearly all modern networks printers sold since
86*5e7646d2SAndroid Build Coastguard Workerabout 2009.  For example, the following command creates a print queue for a
87*5e7646d2SAndroid Build Coastguard Workerprinter at address "11.22.33.44":
88*5e7646d2SAndroid Build Coastguard Worker
89*5e7646d2SAndroid Build Coastguard Worker    lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
90*5e7646d2SAndroid Build Coastguard Worker
91*5e7646d2SAndroid Build Coastguard WorkerCUPS also includes several sample PPD files you can use for "legacy" printers:
92*5e7646d2SAndroid Build Coastguard Worker
93*5e7646d2SAndroid Build Coastguard Worker   Driver                         | PPD Name
94*5e7646d2SAndroid Build Coastguard Worker   -----------------------------  | ------------------------------
95*5e7646d2SAndroid Build Coastguard Worker   Dymo Label Printers            | drv:///sample.drv/dymo.ppd
96*5e7646d2SAndroid Build Coastguard Worker   Intellitech Intellibar         | drv:///sample.drv/intelbar.ppd
97*5e7646d2SAndroid Build Coastguard Worker   EPSON 9-pin Series             | drv:///sample.drv/epson9.ppd
98*5e7646d2SAndroid Build Coastguard Worker   EPSON 24-pin Series            | drv:///sample.drv/epson24.ppd
99*5e7646d2SAndroid Build Coastguard Worker   Generic PCL Laser Printer      | drv:///sample.drv/generpcl.ppd
100*5e7646d2SAndroid Build Coastguard Worker   Generic PostScript Printer     | drv:///sample.drv/generic.ppd
101*5e7646d2SAndroid Build Coastguard Worker   HP DeskJet Series              | drv:///sample.drv/deskjet.ppd
102*5e7646d2SAndroid Build Coastguard Worker   HP LaserJet Series             | drv:///sample.drv/laserjet.ppd
103*5e7646d2SAndroid Build Coastguard Worker   OKIDATA 9-Pin Series           | drv:///sample.drv/okidata9.ppd
104*5e7646d2SAndroid Build Coastguard Worker   OKIDATA 24-Pin Series          | drv:///sample.drv/okidat24.ppd
105*5e7646d2SAndroid Build Coastguard Worker   Zebra CPCL Label Printer       | drv:///sample.drv/zebracpl.ppd
106*5e7646d2SAndroid Build Coastguard Worker   Zebra EPL1 Label Printer       | drv:///sample.drv/zebraep1.ppd
107*5e7646d2SAndroid Build Coastguard Worker   Zebra EPL2 Label Printer       | drv:///sample.drv/zebraep2.ppd
108*5e7646d2SAndroid Build Coastguard Worker   Zebra ZPL Label Printer        | drv:///sample.drv/zebra.ppd
109*5e7646d2SAndroid Build Coastguard Worker
110*5e7646d2SAndroid Build Coastguard WorkerYou can run the `lpinfo -m` command to list all of the available drivers:
111*5e7646d2SAndroid Build Coastguard Worker
112*5e7646d2SAndroid Build Coastguard Worker    lpinfo -m
113*5e7646d2SAndroid Build Coastguard Worker
114*5e7646d2SAndroid Build Coastguard WorkerRun the `lpinfo -v` command to list the available printers:
115*5e7646d2SAndroid Build Coastguard Worker
116*5e7646d2SAndroid Build Coastguard Worker    lpinfo -v
117*5e7646d2SAndroid Build Coastguard Worker
118*5e7646d2SAndroid Build Coastguard WorkerThen use the correct URI to add the printer using the `lpadmin` command:
119*5e7646d2SAndroid Build Coastguard Worker
120*5e7646d2SAndroid Build Coastguard Worker    lpadmin -p printername -E -v device-uri -m ppd-name
121*5e7646d2SAndroid Build Coastguard Worker
122*5e7646d2SAndroid Build Coastguard WorkerCurrent network printers typically use `ipp` or `ipps` URIS:
123*5e7646d2SAndroid Build Coastguard Worker
124*5e7646d2SAndroid Build Coastguard Worker    lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
125*5e7646d2SAndroid Build Coastguard Worker    lpadmin -p printername -E -v ipps://11.22.33.44/ipp/print -m everywhere
126*5e7646d2SAndroid Build Coastguard Worker
127*5e7646d2SAndroid Build Coastguard WorkerOlder network printers typically use `socket` or `lpd` URIs:
128*5e7646d2SAndroid Build Coastguard Worker
129*5e7646d2SAndroid Build Coastguard Worker    lpadmin -p printername -E -v socket://11.22.33.44 -m ppd-name
130*5e7646d2SAndroid Build Coastguard Worker    lpadmin -p printername -E -v lpd://11.22.33.44/ -m ppd-name
131*5e7646d2SAndroid Build Coastguard Worker
132*5e7646d2SAndroid Build Coastguard WorkerThe sample drivers provide basic printing capabilities, but generally do not
133*5e7646d2SAndroid Build Coastguard Workerexercise the full potential of the printers or CUPS.  Other drivers provide
134*5e7646d2SAndroid Build Coastguard Workergreater printing capabilities.
135*5e7646d2SAndroid Build Coastguard Worker
136*5e7646d2SAndroid Build Coastguard Worker
137*5e7646d2SAndroid Build Coastguard WorkerPRINTING FILES
138*5e7646d2SAndroid Build Coastguard Worker--------------
139*5e7646d2SAndroid Build Coastguard Worker
140*5e7646d2SAndroid Build Coastguard WorkerCUPS provides both the System V `lp` and Berkeley `lpr` commands for printing:
141*5e7646d2SAndroid Build Coastguard Worker
142*5e7646d2SAndroid Build Coastguard Worker    lp filename
143*5e7646d2SAndroid Build Coastguard Worker    lpr filename
144*5e7646d2SAndroid Build Coastguard Worker
145*5e7646d2SAndroid Build Coastguard WorkerBoth the `lp` and `lpr` commands support printing options for the driver:
146*5e7646d2SAndroid Build Coastguard Worker
147*5e7646d2SAndroid Build Coastguard Worker    lp -o media=A4 -o resolution=600dpi filename
148*5e7646d2SAndroid Build Coastguard Worker    lpr -o media=A4 -o resolution=600dpi filename
149*5e7646d2SAndroid Build Coastguard Worker
150*5e7646d2SAndroid Build Coastguard WorkerCUPS recognizes many types of images files as well as PDF, PostScript, and text
151*5e7646d2SAndroid Build Coastguard Workerfiles, so you can print those files directly rather than through an application.
152*5e7646d2SAndroid Build Coastguard Worker
153*5e7646d2SAndroid Build Coastguard WorkerIf you have an application that generates output specifically for your printer
154*5e7646d2SAndroid Build Coastguard Workerthen you need to use the `-oraw` or `-l` options:
155*5e7646d2SAndroid Build Coastguard Worker
156*5e7646d2SAndroid Build Coastguard Worker    lp -o raw filename
157*5e7646d2SAndroid Build Coastguard Worker    lpr -l filename
158*5e7646d2SAndroid Build Coastguard Worker
159*5e7646d2SAndroid Build Coastguard WorkerThis will prevent the filters from misinterpreting your print file.
160*5e7646d2SAndroid Build Coastguard Worker
161*5e7646d2SAndroid Build Coastguard Worker
162*5e7646d2SAndroid Build Coastguard WorkerLEGAL STUFF
163*5e7646d2SAndroid Build Coastguard Worker-----------
164*5e7646d2SAndroid Build Coastguard Worker
165*5e7646d2SAndroid Build Coastguard WorkerCopyright © 2007-2021 by Apple Inc.
166*5e7646d2SAndroid Build Coastguard WorkerCopyright © 1997-2007 by Easy Software Products.
167*5e7646d2SAndroid Build Coastguard Worker
168*5e7646d2SAndroid Build Coastguard WorkerCUPS is provided under the terms of the Apache License, Version 2.0 with
169*5e7646d2SAndroid Build Coastguard Workerexceptions for GPL2/LGPL2 software.  A copy of this license can be found in the
170*5e7646d2SAndroid Build Coastguard Workerfile `LICENSE`.  Additional legal information is provided in the file `NOTICE`.
171*5e7646d2SAndroid Build Coastguard Worker
172*5e7646d2SAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software distributed
173*5e7646d2SAndroid Build Coastguard Workerunder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
174*5e7646d2SAndroid Build Coastguard WorkerCONDITIONS OF ANY KIND, either express or implied.  See the License for the
175*5e7646d2SAndroid Build Coastguard Workerspecific language governing permissions and limitations under the License.
176