~ubuntu-branches/ubuntu/hoary/lpr/hoary

« back to all changes in this revision

Viewing changes to SMM.doc/5.t

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-03-15 14:54:38 UTC
  • Revision ID: james.westby@ubuntu.com-20030315145438-3n1sxzrmv1g34n4t
Tags: upstream-2000.05.07
ImportĀ upstreamĀ versionĀ 2000.05.07

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" $OpenBSD: 5.t,v 1.2 1997/01/17 15:54:17 millert Exp $
 
2
.\"
 
3
.\" Copyright (c) 1983, 1993
 
4
.\"     The Regents of the University of California.  All rights reserved.
 
5
.\"
 
6
.\" Redistribution and use in source and binary forms, with or without
 
7
.\" modification, are permitted provided that the following conditions
 
8
.\" are met:
 
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.
 
21
.\"
 
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
 
32
.\" SUCH DAMAGE.
 
33
.\"
 
34
.\"     @(#)5.t 8.1 (Berkeley) 6/8/93
 
35
.\"
 
36
.NH 1
 
37
Output filter specifications
 
38
.PP
 
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.
 
44
.PP
 
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
 
48
.B lf
 
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.
 
53
When \fIlprm\fP
 
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.
 
60
.PP
 
61
Arguments passed to a filter depend on its type.
 
62
The
 
63
.B of
 
64
filter is called with the following arguments.
 
65
.DS
 
66
\fIfilter\fP \fB\-w\fPwidth \fB\-l\fPlength
 
67
.DE
 
68
The \fIwidth\fP and \fIlength\fP values come from the
 
69
.B pw
 
70
and
 
71
.B pl
 
72
entries in the printcap database.
 
73
The
 
74
.B if
 
75
filter is passed the following parameters.
 
76
.DS
 
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
 
78
.DE
 
79
The
 
80
.B \-c
 
81
flag is optional, and only supplied when control characters
 
82
are to be passed uninterpreted to the printer (when using the
 
83
.B \-l
 
84
option of
 
85
.I lpr
 
86
to print the file).
 
87
The
 
88
.B \-w
 
89
and
 
90
.B \-l
 
91
parameters are the same as for the
 
92
.B of
 
93
filter.
 
94
The
 
95
.B \-n
 
96
and
 
97
.B \-h
 
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
 
100
.IR printcap .
 
101
.PP
 
102
All other filters are called with the following arguments:
 
103
.DS
 
104
\fIfilter\fP \fB\-x\fPwidth \fB\-y\fPlength \fB\-n\fP login \fB\-h\fP host accounting_file
 
105
.DE
 
106
The
 
107
.B \-x
 
108
and
 
109
.B \-y
 
110
options specify the horizontal and vertical page
 
111
size in pixels (from the
 
112
.B px
 
113
and
 
114
.B py
 
115
entries in the printcap file).
 
116
The rest of the arguments are the same as for the
 
117
.B if
 
118
filter.