]> git.ipfire.org Git - thirdparty/cups.git/blame - man/filter.man
Merge changes from CUPS 1.6svn-r10437.
[thirdparty/cups.git] / man / filter.man
CommitLineData
ef416fc2 1.\"
75bd9771 2.\" "$Id: filter.man 7600 2008-05-20 21:06:23Z mike $"
ef416fc2 3.\"
321d8d57 4.\" filter man page for CUPS.
ef416fc2 5.\"
f3c17241 6.\" Copyright 2007-2012 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.\"
f3c17241 15.TH filter 7 "CUPS" "13 April 2012" "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
178cb736
MS
34The command name (argv[0]) is set to the name of the destination printer but is
35also available in the PRINTER environment variable.
f3c17241
MS
36.SH WARNING
37CUPS filters are not meant to be run directly by the user. Aside from the legacy
38System V interface issues (argv[0] is the printer name), CUPS filters also
39expect specific environment variables and file descriptors, and typically run in
40a user session that (on OS X) has additional restrictions that affect how it
41runs. Unless you are a developer and know what you are doing, please do not run
42filters directly. Instead, use the \fIcupsfilter(8)\fR program to use the
43appropriate filters to do the conversions you need.
178cb736
MS
44.SH OPTIONS
45Options passed on the command-line typically do not include the default choices
46the printer's PPD file. In addition, some options may be specified in multiple
47ways - "landscape" is a synonym for "orientation-requested=4", "media" is a
48synonym for "PageSize", "PageRegion", "InputSlot", and "MediaType", and "sides"
49is a synonym for the various "Duplex" options. Non-raster filters \fBmust\fR
50support both explicit and implicit specification of PPD options - use the
51ppdMarkDefaults and cupsMarkOptions functions in the CUPS library to use the
52correct mapping, and ppdFindMarkedChoice to get the user-selected choice.
53.LP
54Raster filters should use option choices set through the raster page header, as
55those reflect the options in effect for a given page. Options specified on the
56command-line determine the default values for the entire job, which can be
57overridden on a per-page basis.
bd7854cb 58.SH LOG MESSAGES
59Messages sent to stderr are generally logged to
60printer-state-message attribute and the current \fIErrorLog\fR.
61Each line begins with a standard prefix:
bd7854cb 62.TP 5
63ALERT: message
64.br
65Sets the printer-state-message attribute and adds the specified
66message to the current \fIErrorLog\fR using the "alert" log level.
bd7854cb 67.TP 5
68ATTR: attribute=value [attribute=value]
69.br
f3c17241
MS
70Sets the named job or printer attribute(s). The following job attributes can be
71set: "job-media-progress". The following printer attributes can be set:
72"auth-info-required", "marker-colors", "marker-high-levels", "marker-levels",
73"marker-low-levels", "marker-message", "marker-names", "marker-types",
74"printer-alert", and "printer-alert-description".
bd7854cb 75.TP 5
76CRIT: message
77.br
78Sets the printer-state-message attribute and adds the specified
79message to the current \fIErrorLog\fR using the "critical" log level.
bd7854cb 80.TP 5
81DEBUG: message
82.br
83Sets the printer-state-message attribute and adds the specified
84message to the current \fIErrorLog\fR using the "debug" log level.
bd7854cb 85.TP 5
86DEBUG2: message
87.br
88Sets the printer-state-message attribute and adds the specified
89message to the current \fIErrorLog\fR using the "debug2" log level.
bd7854cb 90.TP 5
91EMERG: message
92.br
93Sets the printer-state-message attribute and adds the specified
94message to the current \fIErrorLog\fR using the "emergency" log level.
bd7854cb 95.TP 5
96ERROR: message
97.br
98Sets the printer-state-message attribute and adds the specified
99message to the current \fIErrorLog\fR using the "error" log level.
bd7854cb 100.TP 5
101INFO: message
102.br
103Sets the printer-state-message attribute. If the current \fILogLevel\fR
104is set to "debug2", also adds the specified message to the
105current \fIErrorLog\fR using the "info" log level.
bd7854cb 106.TP 5
107NOTICE: message
108.br
109Sets the printer-state-message attribute and adds the specified
110message to the current \fIErrorLog\fR using the "notice" log level.
bd7854cb 111.TP 5
112PAGE: page-number #-copies
113.TP 5
bc44d920 114PAGE: total #-pages
bd7854cb 115.br
116Adds an entry to the current \fIPageLog\fR. The first form adds
117#-copies to the job-media-sheets-completed attribute. The second
118form sets the job-media-sheets-completed attribute to #-pages.
c9fc04c6
MS
119.TP 5
120PPD: Keyword=Value ... KeywordN=Value
121.br
122Sets the named keywords in the printer's PPD file. This is typically
123used to update default option keywords such as DefaultPageSize and
124the various installable options in the PPD file.
bd7854cb 125.TP 5
126STATE: printer-state-reason [printer-state-reason ...]
127.TP 5
128STATE: + printer-state-reason [printer-state-reason ...]
129.TP 5
130STATE: - printer-state-reason [printer-state-reason ...]
131.br
132Sets, adds, or removes printer-state-reason keywords to the
133current queue. Typically this is used to indicate media, ink, and
134toner conditions on a printer.
bd7854cb 135.TP 5
136WARNING: message
137.br
138Sets the printer-state-message attribute and adds the specified
139message to the current \fIErrorLog\fR using the "warning" log level.
ef416fc2 140.SH ENVIRONMENT VARIABLES
bd7854cb 141The following environment variables are defined by the CUPS
80ca4592 142server when executing the filter:
ef416fc2 143.TP 5
144CHARSET
145.br
bd7854cb 146The default text character set, typically utf-8.
ef416fc2 147.TP 5
148CLASS
149.br
150When a job is submitted to a printer class, contains the name of
151the destination printer class. Otherwise this environment
152variable will not be set.
153.TP 5
154CONTENT_TYPE
155.br
bd7854cb 156The MIME type associated with the file (e.g.
157application/postscript).
0af14961
MS
158.TP 5
159CUPS_CACHEDIR
160.br
161The directory for semi-persistent cache files can be found.
ef416fc2 162.TP 5
163CUPS_DATADIR
164.br
165The directory where data files can be found.
0af14961
MS
166.TP 5
167CUPS_FILETYPE
168.br
169The type of file being printed: "job-sheet" for a banner page and "document"
170for a regular print file.
ef416fc2 171.TP 5
172CUPS_SERVERROOT
173.br
174The root directory of the server.
175.TP 5
176DEVICE_URI
177.br
80ca4592 178The device-uri associated with the printer.
bd7854cb 179.TP 5
180FINAL_CONTENT_TYPE
181.br
182The MIME type associated with the printer (e.g.
183application/vnd.cups-postscript).
ef416fc2 184.TP 5
185LANG
186.br
187The default language locale (typically C or en).
188.TP 5
189PATH
190.br
bd7854cb 191The standard execution path for external programs that may be run by
80ca4592 192the filter.
ef416fc2 193.TP 5
194PPD
195.br
bd7854cb 196The full pathname of the PostScript Printer Description (PPD)
197file for this printer.
ef416fc2 198.TP 5
199PRINTER
200.br
bd7854cb 201The name of the printer.
ef416fc2 202.TP 5
203RIP_CACHE
204.br
bd7854cb 205The recommended amount of memory to use for Raster Image
206Processors (RIPs).
ef416fc2 207.TP 5
208SOFTWARE
209.br
bd7854cb 210The name and version number of the server (typically CUPS/1.2).
ef416fc2 211.TP 5
212TZ
213.br
214The timezone of the server.
215.TP 5
216USER
217.br
80ca4592 218The user executing the filter, typically "lp" or "root"; consult the
bd7854cb 219\fIcupsd.conf(5)\fR file for the current setting.
ef416fc2 220.SH COMPATIBILITY
221While the filter interface is compatible with System V interface
222scripts, it will only work with the System V interface script as the
223only filter. Typically the interface script will be provided via the
bd7854cb 224\fIlpadmin(8)\fR command using the \fI-i\fR option.
ef416fc2 225.SH SEE ALSO
f3c17241 226\fIbackend(7)\fR, \fIcupsd(8)\fR, \fIcupsfilter(8)\fR,
bd7854cb 227.br
228http://localhost:631/help
ef416fc2 229.SH COPYRIGHT
f3c17241 230Copyright 2007-2012 by Apple Inc.
ef416fc2 231.\"
75bd9771 232.\" End of "$Id: filter.man 7600 2008-05-20 21:06:23Z mike $".
ef416fc2 233.\"