1 .\" Copyright (c) 1983, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)5.t 8.1 (Berkeley) 6/8/93
35 Output filter specifications
37 The filters supplied with 4.3BSD
38 handle printing and accounting for most common
39 line printers, the Benson-Varian, the wide (36") and
40 narrow (11") Versatec printer/plotters. For other devices or accounting
41 methods, it may be necessary to create a new filter.
43 Filters are spawned by \fIlpd\fP
44 with their standard input the data to be printed, and standard output
45 the printer. The standard error is attached to the
47 file for logging errors or \fIsyslogd\fP may be used for logging errors.
48 A filter must return a 0 exit
49 code if there were no errors, 1 if the job should be reprinted,
50 and 2 if the job should be thrown away.
52 sends a kill signal to the \fIlpd\fP process controlling
53 printing, it sends a SIGINT signal
54 to all filters and descendents of filters.
55 This signal can be trapped by filters that need
56 to do cleanup operations such as
57 deleting temporary files.
59 Arguments passed to a filter depend on its type.
62 filter is called with the following arguments.
64 \fIfilter\fP \fB\-w\fPwidth \fB\-l\fPlength
66 The \fIwidth\fP and \fIlength\fP values come from the
70 entries in the printcap database.
73 filter is passed the following parameters.
75 \fIfilter\fP [\|\fB\-c\fP\|] \fB\-w\fPwidth \fB\-l\fPlength \fB\-i\fPindent \fB\-n\fP login \fB\-h\fP host accounting_file
79 flag is optional, and only supplied when control characters
80 are to be passed uninterpreted to the printer (when using the
89 parameters are the same as for the
96 parameters specify the login name and host name of the job owner.
97 The last argument is the name of the accounting file from
100 All other filters are called with the following arguments:
102 \fIfilter\fP \fB\-x\fPwidth \fB\-y\fPlength \fB\-n\fP login \fB\-h\fP host accounting_file
108 options specify the horizontal and vertical page
109 size in pixels (from the
113 entries in the printcap file).
114 The rest of the arguments are the same as for the