]> git.ipfire.org Git - thirdparty/cups.git/blame - man/backend.man
Load cups into easysw/current.
[thirdparty/cups.git] / man / backend.man
CommitLineData
ef416fc2 1.\"
2.\" "$Id: backend.man 4884 2005-12-16 01:02:42Z mike $"
3.\"
4.\" Backend man page for the Common UNIX Printing System (CUPS).
5.\"
6.\" Copyright 1997-2005 by Easy Software Products.
7.\"
8.\" These coded instructions, statements, and computer programs are the
9.\" property of Easy Software Products and are protected by Federal
10.\" copyright law. Distribution and use rights are outlined in the file
11.\" "LICENSE.txt" which should have been included with this file. If this
12.\" file is missing or damaged please contact Easy Software Products
13.\" at:
14.\"
15.\" Attn: CUPS Licensing Information
16.\" Easy Software Products
17.\" 44141 Airport View Drive, Suite 204
18.\" Hollywood, Maryland 20636 USA
19.\"
20.\" Voice: (301) 373-9600
21.\" EMail: cups-info@cups.org
22.\" WWW: http://www.cups.org
23.\"
24.TH backend 1 "Common UNIX Printing System" "15 December 2005" "Easy Software Products"
25
26.SH NAME
27backend \- cups backend transmission interfaces
28
29.SH SYNOPSIS
30.B backend
31.br
32.B backend
33job user title num-copies options [
34.I filename
35]
36
37.SH DESCRIPTION
38The CUPS backend interface provides a standard method for sending
39document files to different physical interfaces.
40
41.LP
42Backends must be capable of reading from a filename on the
43command-line or from the standard input, copying the standard
44input to a temporary file if required by the physical interface.
45
46.LP
47The command name (argv[0]) is set to the device URI of the
48destination printer. Starting with CUPS 1.1.22, any
49authentication information in argv[0] will be removed, so
50backend developers are urged to use the DEVICE_URI environment
51variable whenever authentication information is required.
52
53.LP
54Backchannel data from the device should be relayed to the job
55filters by writing to file descriptor 3. The CUPS API includes
56the \fIcupsBackchannelWrite\fR function for this purpose.
57
58.SH DEVICE DISCOVERY
59When run with no arguments, the backend should list the devices
60and schemes it supports or is advertising to stdout. The output
61consists of zero or more lines consisting of any of the following
62forms:
63
64.nf
65device-class scheme "Unknown" "device-info"
66device-class device-uri "device-make-and-model" "device-info"
67device-class device-uri "device-make-and-model" "device-info" "device-id"
68.fi
69
70.LP
71The \fIdevice-class\fR field is one of the following values:
72
73.TP 5
74direct
75.br
76The device-uri refers to a specific direct-access device with no
77options, such as a parallel, USB, or SCSI device.
78
79.TP 5
80file
81.br
82The device-uri refers to a file on disk.
83
84.TP 5
85network
86.br
87The device-uri refers to a networked device and conforms to the
88general form for network URIs.
89
90.TP 5
91serial
92.br
93The device-uri refers to a serial device with configurable baud
94rate and other options. If the device-uri contains a baud value,
95it represents the maximum baud rate supported by the device.
96
97.LP
98The \fIscheme\fR field provides the URI scheme that is supported
99by the backend. Backends should use this form only when the
100backend supports any URI using that scheme. The \fIdevice-uri\fR
101field specifies the full URI to use when communicating with the
102device.
103
104.LP
105The \fIdevice-make-and-model\fR field specifies the make and
106model of the device, e.g. "Acme Foojet 2000". If the make and
107model is not known, you must report "Unknown".
108
109.LP
110The \fIdevice-info\fR field specifies additional information
111about the device. Typically this includes the make and model
112along with the port number or network address, e.g. "Acme Foojet
1132000 USB #1".
114
115.LP
116The optional \fIdevice-id\fR field specifies the IEEE-1284 device
117ID string for the device, which is used to select a matching
118driver.
119
120.SH EXIT CODES
121The following exit codes are defined for backends:
122
123.TP 5
1240 (CUPS_BACKEND_OK)
125.br
126The print file was successfully transmitted to the device or
127remote server.
128
129.TP 5
1301 (CUPS_BACKEND_FAILED)
131.br
132The print file was not successfully transmitted to the device or
133remote server. The scheduler will respond to this by canceling
134the job, retrying the job, or stopping the queue depending on the
135state of the error-policy attribute.
136
137.TP 5
1382 (CUPS_BACKEND_CANCEL)
139.br
140The print file was not successfully transmitted because one or
141more attributes are not supported. The scheduler will respond to
142this by canceling the job.
143
144.TP 5
1453 (CUPS_BACKEND_HOLD)
146.br
147The print file was not successfully transmitted because it cannot
148be printed at this time. The scheduler will respond to this by
149holding the job.
150
151.TP 5
1524 (CUPS_BACKEND_STOP)
153.br
154The print file was not successfully transmitted because it cannot
155be printed at this time. The scheduler will respond to this by
156stopping the queue.
157
158.TP 5
1595 (CUPS_BACKEND_AUTH_REQUIRED)
160.br
161The print file was not successfully transmitted because valid
162authentication information is required. The scheduler will
163respond to this by holding the job and adding the
164authentication-required job-reasons keyword.
165
166.PP
167All other exit code values are reserved.
168
169.SH LOG MESSAGES
170Messages sent to stderr are generally logged to
171printer-state-message attribute and the current ErrorLog. Each
172line begins with a standard prefix:
173
174.TP 5
175ALERT: message
176.br
177Sets the printer-state-message attribute and adds the specified
178message to the current ErrorLog using the "alert" log level.
179
180.TP 5
181ATTR: attribute=value [attribute=value]
182.br
183Sets the named job attribute(s). Typically this will be used to
184set the job-remote-id attribute.
185
186.TP 5
187CRIT: message
188.br
189Sets the printer-state-message attribute and adds the specified
190message to the current ErrorLog using the "critical" log level.
191
192.TP 5
193DEBUG: message
194.br
195Sets the printer-state-message attribute and adds the specified
196message to the current ErrorLog using the "debug" log level.
197
198.TP 5
199DEBUG2: message
200.br
201Sets the printer-state-message attribute and adds the specified
202message to the current ErrorLog using the "debug2" log level.
203
204.TP 5
205EMERG: message
206.br
207Sets the printer-state-message attribute and adds the specified
208message to the current ErrorLog using the "emergency" log level.
209
210.TP 5
211ERROR: message
212.br
213Sets the printer-state-message attribute and adds the specified
214message to the current ErrorLog using the "error" log level.
215
216.TP 5
217INFO: message
218.br
219Sets the printer-state-message attribute. If the current LogLevel
220is set to "debug2", also adds the specified message to the
221current ErrorLog using the "info" log level.
222
223.TP 5
224NOTICE: message
225.br
226Sets the printer-state-message attribute and adds the specified
227message to the current ErrorLog using the "notice" log level.
228
229.TP 5
230PAGE: page-number #-copies
231.TP 5
232PAGE: #-pages total
233.br
234Adds an entry to the current PageLog. The first form adds
235#-copies to the job-media-sheets-completed attribute. The second
236form sets the job-media-sheets-completed attribute to #-pages.
237
238.TP 5
239STATE: printer-state-reason [printer-state-reason ...]
240.TP 5
241STATE: + printer-state-reason [printer-state-reason ...]
242.TP 5
243STATE: - printer-state-reason [printer-state-reason ...]
244.br
245Sets, adds, or removes printer-state-reason keywords to the
246current queue. Typically this is used to indicate media, ink, and
247toner conditions on a printer.
248
249.TP 5
250WARNING: message
251.br
252Sets the printer-state-message attribute and adds the specified
253message to the current ErrorLog using the "warning" log level.
254
255.SH ENVIRONMENT VARIABLES
256The following environment variables are defined by the CUPS
257server when executing the backend:
258
259.TP 5
260CHARSET
261.br
262The default text character set, typically utf-8.
263
264.TP 5
265CLASS
266.br
267When a job is submitted to a printer class, contains the name of
268the destination printer class. Otherwise this environment
269variable will not be set.
270
271.TP 5
272CONTENT_TYPE
273.br
274The MIME type associated with the file (e.g.
275application/postscript).
276
277.TP 5
278CUPS_DATADIR
279.br
280The directory where data files can be found.
281
282.TP 5
283CUPS_SERVERROOT
284.br
285The root directory of the server.
286
287.TP 5
288DEVICE_URI
289.br
290The device-uri associated with the printer; this is provided for
291shell scripts which may not be able to get the passed argv[0]
292string and for backends that require any authentication
293information which is not included in argv[0].
294
295.TP 5
296LANG
297.br
298The default language locale (typically C or en).
299
300.TP 5
301PATH
302.br
303The standard execution path for external programs that may be run by
304the backend.
305
306.TP 5
307PPD
308.br
309The full pathname of the PostScript Printer Description (PPD)
310file for this printer.
311
312.TP 5
313PRINTER
314.br
315The name of the printer.
316
317.TP 5
318RIP_CACHE
319.br
320The recommended amount of memory to use for Raster Image
321Processors (RIPs).
322
323.TP 5
324SOFTWARE
325.br
326The name and version number of the server (typically CUPS/1.1).
327
328.TP 5
329TZ
330.br
331The timezone of the server.
332
333.TP 5
334USER
335.br
336The user executing the backend, typically root; consult the
337cupsd.conf file for the current setting.
338
339.SH SEE ALSO
340cupsd(8), filter(1)
341.br
342http://localhost:631/help
343
344.SH COPYRIGHT
345Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
346.\"
347.\" End of "$Id: backend.man 4884 2005-12-16 01:02:42Z mike $".
348.\"