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