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