]> git.ipfire.org Git - thirdparty/cups.git/blame - man/filter.man
Merge changes from CUPS trunk, r7566.
[thirdparty/cups.git] / man / filter.man
CommitLineData
ef416fc2 1.\"
bc44d920 2.\" "$Id: filter.man 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 3.\"
4.\" filter man page for the Common UNIX Printing System (CUPS).
5.\"
c9fc04c6 6.\" Copyright 2007-2008 by Apple Inc.
bc44d920 7.\" Copyright 1997-2007 by Easy Software Products.
ef416fc2 8.\"
9.\" These coded instructions, statements, and computer programs are the
bc44d920 10.\" property of Apple Inc. and are protected by Federal copyright
11.\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
12.\" which should have been included with this file. If this file is
13.\" file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 14.\"
c9fc04c6 15.TH filter 7 "Common UNIX Printing System" "14 May 2008" "Apple Inc."
ef416fc2 16.SH NAME
bd7854cb 17filter \- cups file conversion filter interface
ef416fc2 18.SH SYNOPSIS
19.B filter
20job user title num-copies options [
21.I filename
22]
23.SH DESCRIPTION
24The CUPS filter interface provides a standard method for adding support for
25new document types to CUPS. Each filter is capable of converting from one
26or more input formats to another format that can either be printed directly
27or piped into another filter to get it to a printable format.
28.LP
bd7854cb 29Filters \fBmust\fR be capable of reading from a filename on the command-line
ef416fc2 30or from the standard input, copying the standard input to a temporary
bd7854cb 31file as required by the file format. All output \fBmust\fR be sent to the
ef416fc2 32standard output.
33.LP
34The command name (argv[0]) is set to the name of the destination printer.
bd7854cb 35.SH LOG MESSAGES
36Messages sent to stderr are generally logged to
37printer-state-message attribute and the current \fIErrorLog\fR.
38Each line begins with a standard prefix:
39
40.TP 5
41ALERT: message
42.br
43Sets the printer-state-message attribute and adds the specified
44message to the current \fIErrorLog\fR using the "alert" log level.
45
46.TP 5
47ATTR: attribute=value [attribute=value]
48.br
49Sets the named job attribute(s). Typically this will be used to
50set the job-remote-id attribute.
51
52.TP 5
53CRIT: message
54.br
55Sets the printer-state-message attribute and adds the specified
56message to the current \fIErrorLog\fR using the "critical" log level.
57
58.TP 5
59DEBUG: message
60.br
61Sets the printer-state-message attribute and adds the specified
62message to the current \fIErrorLog\fR using the "debug" log level.
63
64.TP 5
65DEBUG2: message
66.br
67Sets the printer-state-message attribute and adds the specified
68message to the current \fIErrorLog\fR using the "debug2" log level.
69
70.TP 5
71EMERG: message
72.br
73Sets the printer-state-message attribute and adds the specified
74message to the current \fIErrorLog\fR using the "emergency" log level.
75
76.TP 5
77ERROR: message
78.br
79Sets the printer-state-message attribute and adds the specified
80message to the current \fIErrorLog\fR using the "error" log level.
81
82.TP 5
83INFO: message
84.br
85Sets the printer-state-message attribute. If the current \fILogLevel\fR
86is set to "debug2", also adds the specified message to the
87current \fIErrorLog\fR using the "info" log level.
88
89.TP 5
90NOTICE: message
91.br
92Sets the printer-state-message attribute and adds the specified
93message to the current \fIErrorLog\fR using the "notice" log level.
94
95.TP 5
96PAGE: page-number #-copies
97.TP 5
bc44d920 98PAGE: total #-pages
bd7854cb 99.br
100Adds an entry to the current \fIPageLog\fR. The first form adds
101#-copies to the job-media-sheets-completed attribute. The second
102form sets the job-media-sheets-completed attribute to #-pages.
103
c9fc04c6
MS
104.TP 5
105PPD: Keyword=Value ... KeywordN=Value
106.br
107Sets the named keywords in the printer's PPD file. This is typically
108used to update default option keywords such as DefaultPageSize and
109the various installable options in the PPD file.
110
bd7854cb 111.TP 5
112STATE: printer-state-reason [printer-state-reason ...]
113.TP 5
114STATE: + printer-state-reason [printer-state-reason ...]
115.TP 5
116STATE: - printer-state-reason [printer-state-reason ...]
117.br
118Sets, adds, or removes printer-state-reason keywords to the
119current queue. Typically this is used to indicate media, ink, and
120toner conditions on a printer.
121
122.TP 5
123WARNING: message
124.br
125Sets the printer-state-message attribute and adds the specified
126message to the current \fIErrorLog\fR using the "warning" log level.
127
ef416fc2 128.SH ENVIRONMENT VARIABLES
bd7854cb 129The following environment variables are defined by the CUPS
80ca4592 130server when executing the filter:
bd7854cb 131
ef416fc2 132.TP 5
133CHARSET
134.br
bd7854cb 135The default text character set, typically utf-8.
136
ef416fc2 137.TP 5
138CLASS
139.br
140When a job is submitted to a printer class, contains the name of
141the destination printer class. Otherwise this environment
142variable will not be set.
bd7854cb 143
ef416fc2 144.TP 5
145CONTENT_TYPE
146.br
bd7854cb 147The MIME type associated with the file (e.g.
148application/postscript).
149
ef416fc2 150.TP 5
151CUPS_DATADIR
152.br
153The directory where data files can be found.
bd7854cb 154
ef416fc2 155.TP 5
156CUPS_SERVERROOT
157.br
158The root directory of the server.
bd7854cb 159
ef416fc2 160.TP 5
161DEVICE_URI
162.br
80ca4592 163The device-uri associated with the printer.
bd7854cb 164
165.TP 5
166FINAL_CONTENT_TYPE
167.br
168The MIME type associated with the printer (e.g.
169application/vnd.cups-postscript).
170
ef416fc2 171.TP 5
172LANG
173.br
174The default language locale (typically C or en).
bd7854cb 175
ef416fc2 176.TP 5
177PATH
178.br
bd7854cb 179The standard execution path for external programs that may be run by
80ca4592 180the filter.
bd7854cb 181
ef416fc2 182.TP 5
183PPD
184.br
bd7854cb 185The full pathname of the PostScript Printer Description (PPD)
186file for this printer.
187
ef416fc2 188.TP 5
189PRINTER
190.br
bd7854cb 191The name of the printer.
192
ef416fc2 193.TP 5
194RIP_CACHE
195.br
bd7854cb 196The recommended amount of memory to use for Raster Image
197Processors (RIPs).
198
ef416fc2 199.TP 5
200SOFTWARE
201.br
bd7854cb 202The name and version number of the server (typically CUPS/1.2).
203
ef416fc2 204.TP 5
205TZ
206.br
207The timezone of the server.
bd7854cb 208
ef416fc2 209.TP 5
210USER
211.br
80ca4592 212The user executing the filter, typically "lp" or "root"; consult the
bd7854cb 213\fIcupsd.conf(5)\fR file for the current setting.
214
ef416fc2 215.SH COMPATIBILITY
216While the filter interface is compatible with System V interface
217scripts, it will only work with the System V interface script as the
218only filter. Typically the interface script will be provided via the
bd7854cb 219\fIlpadmin(8)\fR command using the \fI-i\fR option.
ef416fc2 220.SH SEE ALSO
bd7854cb 221\fIbackend(1)\fR, \fIcupsd(8)\fR,
222.br
223http://localhost:631/help
ef416fc2 224.SH COPYRIGHT
bc44d920 225Copyright 2007 by Apple Inc.
ef416fc2 226.\"
bc44d920 227.\" End of "$Id: filter.man 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 228.\"