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