1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3<html>
4  <head>
5    <meta name="generator" content="HTML Tidy, see www.w3.org">
6    <title>Filters</title>
7    <meta name="GENERATOR" content=
8    "Modular DocBook HTML Stylesheet Version 1.7">
9    <link rel="HOME" title=" LPRng Reference Manual" href=
10    "index.htm">
11    <link rel="PREVIOUS" title="Debugging " href="debugging.htm">
12    <link rel="NEXT" title="Filter Exit Codes " href=
13    "exitcodes.htm">
14  </head>
15
16  <body class="CHAPTER" bgcolor="#FFFFFF" text="#000000" link=
17  "#0000FF" vlink="#840084" alink="#0000FF">
18    <div class="NAVHEADER">
19      <table summary="Header navigation table" width="100%" border=
20      "0" cellpadding="0" cellspacing="0">
21        <tr>
22          <th colspan="3" align="center">LPRng Reference Manual: 5
23          Sep 2003 (For LPRng-3.8.22)</th>
24        </tr>
25
26        <tr>
27          <td width="10%" align="left" valign="bottom"><a href=
28          "debugging.htm" accesskey="P">Prev</a></td>
29
30          <td width="80%" align="center" valign="bottom">
31          </td>
32
33          <td width="10%" align="right" valign="bottom"><a href=
34          "exitcodes.htm" accesskey="N">Next</a></td>
35        </tr>
36      </table>
37      <hr align="LEFT" width="100%">
38    </div>
39
40    <div class="CHAPTER">
41      <h1><a name="FILTERS"></a>Chapter 16. Filters</h1>
42
43      <div class="TOC">
44        <dl>
45          <dt><b>Table of Contents</b></dt>
46
47          <dt>16.1. <a href="filters.htm#AEN7758">Filter
48          Functions</a></dt>
49
50          <dt>16.2. <a href="exitcodes.htm">Filter Exit
51          Codes</a></dt>
52
53          <dt>16.3. <a href="printjobformats.htm">Print Job
54          Formats</a></dt>
55
56          <dt>16.4. <a href="ofdetails.htm">OF Filter</a></dt>
57
58          <dt>16.5. <a href="pr.htm"><b class="APPLICATION">lpr</b>
59          -p format</a></dt>
60
61          <dt>16.6. <a href="x7980.htm"><b class=
62          "APPLICATION">lpr</b> binary (-l) format</a></dt>
63
64          <dt>16.7. <a href="chainingfilters.htm">Chaining
65          Filters</a></dt>
66
67          <dt>16.8. <a href="filteroptions.htm">Filter Command Line
68          Options and Environment Variables</a></dt>
69
70          <dt>16.9. <a href="x8397.htm"><b class=
71          "APPLICATION">LPRng</b> Supported Filters</a></dt>
72
73          <dt>16.10. <a href="lpf.htm">lpf</a></dt>
74
75          <dt>16.11. <a href="ifhp.htm"><b class=
76          "APPLICATION">ifhp</b> Filter</a></dt>
77        </dl>
78      </div>
79
80      <p>This section gives an overview of how <b class=
81      "APPLICATION">LPRng</b> uses filter programs, and gives a
82      detailed discussion of how the printcap options and filters
83      interact.</p>
84
85      <div class="SECT1">
86        <h1 class="SECT1"><a name="AEN7758">16.1. Filter
87        Functions</a></h1>
88
89        <p>Print filters are one of the most powerful tools in
90        BSD-style printer systems.</p>
91
92        <p>In general UNIX terms, a <span class="emphasis"><i
93        class="EMPHASIS">filter</i></span> is a program that takes
94        its input file(s), does something with it, and sends the
95        result to its standard output. Most UNIX utilities are
96        designed as filters. (But since you are a system manager,
97        you should already know that :))</p>
98
99        <p>In the context of a BSD-style print spooler (and also <b
100        class="APPLICATION">LPRng</b>), the term <span class=
101        "emphasis"><i class="EMPHASIS">filter</i></span> refers to
102        a program that processes file while it is being transferred
103        to a printer.</p>
104
105        <p>The filter is executed with <acronym class=
106        "ACRONYM">STDIN</acronym> reading from the file to be
107        printed <acronym class="ACRONYM">STDOUT</acronym> to the
108        printer device or a temporary file. <acronym class=
109        "ACRONYM">STDERR</acronym> (file handle 2) is redirected to
110        the status file, and file handle3 to an accounting file or
111        program.</p>
112
113        <p>A filter can be as simple as a <acronym class=
114        "ACRONYM">LF</acronym> to <tt class="FILENAME">CR/LF</tt>
115        translator, or it can incorporate a complete accounting
116        system, automatic file type translations, or even redirect
117        the job to another printing system.</p>
118
119        <p>The <b class="APPLICATION">lpf</b> filter supplied as
120        part of the <b class="APPLICATION">LPRng</b> distribution
121        is a a very simple CR to CR/LF conversion filter. The <b
122        class="APPLICATION">ifhp</b> filter provides support for
123        more complex PostScript, PCL, and text printers.</p>
124      </div>
125    </div>
126
127    <div class="NAVFOOTER">
128      <hr align="LEFT" width="100%">
129
130      <table summary="Footer navigation table" width="100%" border=
131      "0" cellpadding="0" cellspacing="0">
132        <tr>
133          <td width="33%" align="left" valign="top"><a href=
134          "debugging.htm" accesskey="P">Prev</a></td>
135
136          <td width="34%" align="center" valign="top"><a href=
137          "index.htm" accesskey="H">Home</a></td>
138
139          <td width="33%" align="right" valign="top"><a href=
140          "exitcodes.htm" accesskey="N">Next</a></td>
141        </tr>
142
143        <tr>
144          <td width="33%" align="left" valign="top">Debugging</td>
145
146          <td width="34%" align="center" valign="top">&nbsp;</td>
147
148          <td width="33%" align="right" valign="top">Filter Exit
149          Codes</td>
150        </tr>
151      </table>
152    </div>
153  </body>
154</html>
155
156