• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/LPRng/DOCS/LPRng-Reference-Multipart/
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>Banner Printing and the OF filter</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="UP" title="Print Spooling Tutorial " href=
12    "tutorial.htm">
13    <link rel="PREVIOUS" title="Printcap Basics" href="x3103.htm">
14    <link rel="NEXT" title="Printing from lpr Directly To A Device"
15    href="x3376.htm">
16  </head>
17
18  <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link=
19  "#0000FF" vlink="#840084" alink="#0000FF">
20    <div class="NAVHEADER">
21      <table summary="Header navigation table" width="100%" border=
22      "0" cellpadding="0" cellspacing="0">
23        <tr>
24          <th colspan="3" align="center">LPRng Reference Manual: 5
25          Sep 2003 (For LPRng-3.8.22)</th>
26        </tr>
27
28        <tr>
29          <td width="10%" align="left" valign="bottom"><a href=
30          "x3103.htm" accesskey="P">Prev</a></td>
31
32          <td width="80%" align="center" valign="bottom">Chapter 4.
33          Print Spooling Tutorial</td>
34
35          <td width="10%" align="right" valign="bottom"><a href=
36          "x3376.htm" accesskey="N">Next</a></td>
37        </tr>
38      </table>
39      <hr align="LEFT" width="100%">
40    </div>
41
42    <div class="SECT1">
43      <h1 class="SECT1"><a name="AEN3273">4.12. Banner Printing and
44      the OF filter</a></h1>
45
46      <p>Banner or header pages can be printed at the beginning,
47      end, or both at the beginning or end. The following flags
48      control how and where banners are printed. These flags are
49      listed in order of precedence.</p>
50
51      <div class="VARIABLELIST">
52        <dl>
53          <dt><var class="LITERAL">:sh</var></dt>
54
55          <dd>
56            <p>Suppress all banner printing or header pages. This
57            prevents any banners from being generated by the <b
58            class="APPLICATION">lpd</b> print spooler and if
59            present in a client printcap entry, will cause <b
60            class="APPLICATION">lpr</b> not to put any banner
61            printing information in the control file. Even if this
62            flag is not present, then <b class=
63            "APPLICATION">LPRng</b> will not print a banner unless
64            a banner printing program is specified with the <var
65            class="LITERAL">:bp,</var> <var class=
66            "LITERAL">:bs</var>, <var class="LITERAL">:be</var>, or
67            <var class="LITERAL">:sb</var> option.</p>
68          </dd>
69
70          <dt><var class="LITERAL">:ab</var></dt>
71
72          <dd>
73            <p>Print a banner or header page, even if the user has
74            not requested one. The <var class="LITERAL">:sh</var>
75            option has precedence over the <var class=
76            "LITERAL">:ab</var> option.</p>
77          </dd>
78
79          <dt><var class="LITERAL">:hl</var></dt>
80
81          <dd>
82            <p>The banner (header) is at the end (last page) of the
83            job.</p>
84          </dd>
85
86          <dt><var class="LITERAL">:bs=/...</var> and <var class=
87          "LITERAL">:be=/...</var> and</dt>
88
89          <dd>
90            <p>The <var class="LITERAL">:bs</var> and <var class=
91            "LITERAL">:be</var> options specify that a banner page
92            is to be generated at the start and end of the job
93            respectively, using indicated filter program. If the
94            <var class="LITERAL">:hl</var> flag has been set, only
95            the <var class="LITERAL">:be</var> will be used.</p>
96          </dd>
97
98          <dt><var class="LITERAL">:bp=</var>...</dt>
99
100          <dd>
101            <p>If there is no <var class="LITERAL">:bs</var> or
102            <var class="LITERAL">:be</var> value when printing a
103            banner at the start or end of the job respectively,
104            then use the indicated filter program to generate a
105            banner.</p>
106          </dd>
107
108          <dt><var class="LITERAL">:sb</var> and <var class=
109          "LITERAL">:bl=....</var></dt>
110
111          <dd>
112            <p>If there is no program specified to generate the
113            banner and the <var class="LITERAL">:sb</var> flag is
114            set, send the <var class="LITERAL">:bl</var> (banner
115            line) string to the printer.</p>
116          </dd>
117
118          <dt><var class="LITERAL">:of=filter</var></dt>
119
120          <dd>
121            <p>A filter used to process banners and other non-job
122            file information.</p>
123          </dd>
124
125          <dt><var class="LITERAL">:suspend_of_filter</var></dt>
126
127          <dd>
128            <p>Controls whether the <var class="LITERAL">:of</var>
129            filter is suspended or has its input terminated.</p>
130          </dd>
131        </dl>
132      </div>
133      <br>
134      <br>
135
136      <p>The <b class="APPLICATION">pclbanner</b>, <b class=
137      "APPLICATION">psbanner</b>, and <b class=
138      "APPLICATION">lpbanner</b> programs are part of the <b class=
139      "APPLICATION">LPRng</b> distribution and are usually
140      installed in the same location as the <b class=
141      "APPLICATION">LPRng</b> supported filters. They produce a
142      PCL, PostScript, or text banner respectively.</p>
143
144      <p>The OF filter (<var class="LITERAL">:of=/path</var>) is
145      used to process banner pages and to do any necessary setup to
146      initialize the printer to handle banner pages. This filter
147      has the following unusual behavior:</p>
148
149      <ul>
150        <li>
151          <p>It must be explicitly specified in the printcap file.
152          It is not run by default.</p>
153
154          <p>If specified, it is started at the beginning of job
155          printing and stays present throughout the entire job
156          printing session.</p>
157        </li>
158
159        <li>
160          <p>When printing individual files, the <var class=
161          "LITERAL">:of</var> filter is sent a special <span class=
162          "emphasis"><i class="EMPHASIS">suspend
163          yourself</i></span> two character string, <var class=
164          "LITERAL">\031\001</var>. This will cause the <var class=
165          "LITERAL">:of</var> filter to send itself a <acronym
166          class="ACRONYM">SIGSUSP</acronym> (suspend) signal.</p>
167        </li>
168
169        <li>
170          <p>The <var class="LITERAL">:of</var> filter is restarted
171          when any information not part of a print job file, such
172          as the initialization string (<var class=
173          "LITERAL">:ld</var> option), termination string (<var
174          class="LITERAL">:ld</var> option), or form feeds at start
175          (<var class="LITERAL">:fo</var>), end (<var class=
176          "LITERAL">:fq</var>), and between job files (<var class=
177          "LITERAL">:ff_separator</var>), and when banners are
178          generated by the <var class="LITERAL">:bp</var>, <var
179          class="LITERAL">:bs</var>, <var class=
180          "LITERAL">:be</var>, or <var class="LITERAL">:sb</var>
181          option and need to be sent to the printer.</p>
182        </li>
183      </ul>
184      <br>
185      <br>
186
187      <p>This rather baroque behavior is mostly historical in
188      origin, and is very much embedded in the existing
189      documentation and methodologies of the BSD print spooling
190      system. Originally, when a printer port was opened, a special
191      device initialization string was sent by the printer port
192      device driver; this usually resulted in an extra page of
193      paper being ejected by the printer. By opening the device
194      once and then keeping it open, the print spooler would avoid
195      the wasted paper. The reason for suspending the <var class=
196      "LITERAL">:of</var> filter was simply to save the overhead of
197      creating an extra processes.</p>
198
199      <p>Unfortunately, the <var class="LITERAL">:of</var> filter
200      suspension behavior is now a problem rather than a benefit.
201      For example, for many devices to finish printing a page
202      correctly the filter must be closed in order for it to flush
203      buffers and for the low level drivers to properly finish. In
204      order to provide this functionality, the <var class=
205      "LITERAL">suspend_of_filter@</var> flag can be used. This
206      will cause the <b class="APPLICATION">lpd</b> server to close
207      the <var class="LITERAL">:of</var> filters input, rather than
208      sending it the suspend string, and to restart a new <var
209      class="LITERAL">:of</var> filter process when necessary.</p>
210    </div>
211
212    <div class="NAVFOOTER">
213      <hr align="LEFT" width="100%">
214
215      <table summary="Footer navigation table" width="100%" border=
216      "0" cellpadding="0" cellspacing="0">
217        <tr>
218          <td width="33%" align="left" valign="top"><a href=
219          "x3103.htm" accesskey="P">Prev</a></td>
220
221          <td width="34%" align="center" valign="top"><a href=
222          "index.htm" accesskey="H">Home</a></td>
223
224          <td width="33%" align="right" valign="top"><a href=
225          "x3376.htm" accesskey="N">Next</a></td>
226        </tr>
227
228        <tr>
229          <td width="33%" align="left" valign="top">Printcap
230          Basics</td>
231
232          <td width="34%" align="center" valign="top"><a href=
233          "tutorial.htm" accesskey="U">Up</a></td>
234
235          <td width="33%" align="right" valign="top">Printing from
236          <b class="APPLICATION">lpr</b> Directly To A Device</td>
237        </tr>
238      </table>
239    </div>
240  </body>
241</html>
242
243