File: x3417.htm

package info (click to toggle)
lprng 3.8.10-1.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 13,076 kB
  • ctags: 4,348
  • sloc: ansic: 35,394; sh: 10,756; perl: 2,210; makefile: 1,046
file content (187 lines) | stat: -rw-r--r-- 6,833 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>Print Job Classes, User Requested Job Priority, and Form
    Support</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.71 ">
    <link rel="HOME" title=" LPRng-HOWTO" href="index.htm">
    <link rel="UP" title="Print Spooling Tutorial " href=
    "tutorial.htm">
    <link rel="PREVIOUS" title=
    "Moving Jobs From Queue to Queue and Redirecting Queues" href=
    "x3370.htm">
    <link rel="NEXT" title="Holding and Releasing Jobs" href=
    "x3462.htm">
  </head>

  <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link=
  "#0000FF" vlink="#840084" alink="#0000FF">
    <div class="NAVHEADER">
      <table summary="Header navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <th colspan="3" align="center">LPRng-HOWTO: 1 Apr 2002
          (For LPRng-3.8.10)</th>
        </tr>

        <tr>
          <td width="10%" align="left" valign="bottom"><a href=
          "x3370.htm" accesskey="P">Prev</a></td>

          <td width="80%" align="center" valign="bottom">Chapter 4.
          Print Spooling Tutorial</td>

          <td width="10%" align="right" valign="bottom"><a href=
          "x3462.htm" accesskey="N">Next</a></td>
        </tr>
      </table>
      <hr align="LEFT" width="100%">
    </div>

    <div class="SECT1">
      <h1 class="SECT1"><a name="AEN3417">4.15. Print Job Classes,
      User Requested Job Priority, and Form Support</a></h1>

      <p>The <b class="APPLICATION">LPRng</b> software allows users
      to assign a class name to print jobs using the <tt class=
      "COMMAND">lpr -Cname</tt> option. This causes the <b class=
      "APPLICATION">lpr</b> command to put the line <tt class=
      "LITERAL">Cname</tt> in the control file. By default, the
      (upper cased) first letter of the class name is used to
      assign a user requested priority to the job, with <tt class=
      "LITERAL">A</tt> being the default lowest priority and <tt
      class="LITERAL">Z</tt> being the highest.</p>

      <p>The <tt class=
      "LITERAL">ignore_requested_user_priority</tt> printcap option
      can be used to ignore the user requested priority and jobs
      will be printed in the normal first-in first-out order.</p>

      <p><b class="APPLICATION">LPRng</b> also makes use of the
      class information to do form support and restrict printing to
      a specific set of classes. By default the job class
      information is ignored, but the <tt class="COMMAND">lpc
      class</tt> command can be used to specify one or more classes
      (actually glob patterns) to be printed. This facility can be
      used to do support printing of jobs that require a specific
      form setup. Here is a simple example of how to use this
      facility.</p>

      <p>Edit the printcap file so it has contents indicated below,
      use <tt class="COMMAND">checkpc -f</tt> to check the
      printcap, and then use <tt class="COMMAND">lpc reread</tt> to
      restart the <b class="APPLICATION">lpd</b> server.</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN3435"></a>
<pre class="SCREEN">
    lp:force_localhost
    lp:server
      :sd=/var/spool/lpd/%P
      :lp=lp2@localhost
    lp2:force_localhost
    lp2:server
      :sd=/var/spool/lpd/%P
      :lp=/tmp/lp2
</pre>
      </div>
      Execute the following commands to print the <tt class=
      "FILENAME">/tmp/hi</tt> file and observe the results: 

      <div class="INFORMALEXAMPLE">
        <a name="AEN3438"></a>
<pre class="SCREEN">
    <tt class="PROMPT">h4: {249} %</tt> <tt class=
"USERINPUT"><b>lpc class lp red</b></tt>
    Printer: lp@h4
    classes printed 'red'
    lp@h4.private: class updated
    <tt class="PROMPT">h4: {250} %</tt> <tt class=
"USERINPUT"><b>lpq</b></tt>
    Printer: lp@h4  (classes red)
     Queue: no printable jobs in queue
    <tt class="PROMPT">h4: {251} %</tt> <tt class=
"USERINPUT"><b>lpr /tmp/hi</b></tt>
    <tt class="PROMPT">h4: {252} %</tt> <tt class=
"USERINPUT"><b>lpq</b></tt>
    Printer: lp@h4  (classes red)
     Queue: no printable jobs in queue
     Holding: 1 held jobs in queue
     Server: no server active
     Rank   Owner/ID           Class Job Files        Size Time
    holdclass papowell@h4+82     A    82 /tmp/hi         3 09:29:52
    <tt class="PROMPT">h4: {253} %</tt> <tt class=
"USERINPUT"><b>lpr -Cred /tmp/hi</b></tt>
    <tt class="PROMPT">h4: {254} %</tt> <tt class=
"USERINPUT"><b>lpq</b></tt>
    Printer: lp@h4  (classes red)
     Queue: no printable jobs in queue
     Holding: 1 held jobs in queue
     Server: no server active
     Status: job 'papowell@h4+89' removed at 09:30:13.569
     Rank   Owner/ID           Class Job Files        Size Time
    holdclass papowell@h4+82     A    82 /tmp/hi         3 09:29:52
</pre>
      </div>
      <br>
      <br>

      <p>As seen in the example, we set the queue class to <tt
      class="LITERAL">red</tt>, and then sent a (default) class <tt
      class="LITERAL">A</tt> job to the printer. It was not
      printed, and is listed with <tt class=
      "LITERAL">holdclass</tt> status. We sent another job which
      was immediately printed.</p>

      <p>We can change the print queue class at any time, and then
      new class will then control what jobs are printed. To disable
      the class selection, use the <tt class="COMMAND">lpc class
      queue off</tt> command.</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN3458"></a>
<pre class="SCREEN">
    <tt class="PROMPT">h4: {255} %</tt> <tt class=
"USERINPUT"><b>lpc class lp off</b></tt>
    Printer: lp@h4
    all classes printed
    lp@h4.private: class updated
</pre>
      </div>
      <br>
      <br>
    </div>

    <div class="NAVFOOTER">
      <hr align="LEFT" width="100%">

      <table summary="Footer navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="33%" align="left" valign="top"><a href=
          "x3370.htm" accesskey="P">Prev</a></td>

          <td width="34%" align="center" valign="top"><a href=
          "index.htm" accesskey="H">Home</a></td>

          <td width="33%" align="right" valign="top"><a href=
          "x3462.htm" accesskey="N">Next</a></td>
        </tr>

        <tr>
          <td width="33%" align="left" valign="top">Moving Jobs
          From Queue to Queue and Redirecting Queues</td>

          <td width="34%" align="center" valign="top"><a href=
          "tutorial.htm" accesskey="U">Up</a></td>

          <td width="33%" align="right" valign="top">Holding and
          Releasing Jobs</td>
        </tr>
      </table>
    </div>
  </body>
</html>