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>Print Job Classes, User Requested Job Priority, and Form 7 Support</title> 8 <meta name="GENERATOR" content= 9 "Modular DocBook HTML Stylesheet Version 1.7"> 10 <link rel="HOME" title=" LPRng Reference Manual" href= 11 "index.htm"> 12 <link rel="UP" title="Print Spooling Tutorial " href= 13 "tutorial.htm"> 14 <link rel="PREVIOUS" title= 15 "Moving Jobs From Queue to Queue and Redirecting Queues" href= 16 "x3423.htm"> 17 <link rel="NEXT" title="Holding and Releasing Jobs" href= 18 "x3515.htm"> 19 </head> 20 21 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 22 "#0000FF" vlink="#840084" alink="#0000FF"> 23 <div class="NAVHEADER"> 24 <table summary="Header navigation table" width="100%" border= 25 "0" cellpadding="0" cellspacing="0"> 26 <tr> 27 <th colspan="3" align="center">LPRng Reference Manual: 5 28 Sep 2003 (For LPRng-3.8.22)</th> 29 </tr> 30 31 <tr> 32 <td width="10%" align="left" valign="bottom"><a href= 33 "x3423.htm" accesskey="P">Prev</a></td> 34 35 <td width="80%" align="center" valign="bottom">Chapter 4. 36 Print Spooling Tutorial</td> 37 38 <td width="10%" align="right" valign="bottom"><a href= 39 "x3515.htm" accesskey="N">Next</a></td> 40 </tr> 41 </table> 42 <hr align="LEFT" width="100%"> 43 </div> 44 45 <div class="SECT1"> 46 <h1 class="SECT1"><a name="AEN3470">4.15. Print Job Classes, 47 User Requested Job Priority, and Form Support</a></h1> 48 49 <p>The <b class="APPLICATION">LPRng</b> software allows users 50 to assign a class name to print jobs using the <tt class= 51 "COMMAND">lpr -Cname</tt> option. This causes the <b class= 52 "APPLICATION">lpr</b> command to put the line <var class= 53 "LITERAL">Cname</var> in the control file. By default, the 54 (upper cased) first letter of the class name is used to 55 assign a user requested priority to the job, with <var class= 56 "LITERAL">A</var> being the default lowest priority and <var 57 class="LITERAL">Z</var> being the highest.</p> 58 59 <p>The <var class= 60 "LITERAL">ignore_requested_user_priority</var> printcap 61 option can be used to ignore the user requested priority and 62 jobs will be printed in the normal first-in first-out 63 order.</p> 64 65 <p><b class="APPLICATION">LPRng</b> also makes use of the 66 class information to do form support and restrict printing to 67 a specific set of classes. By default the job class 68 information is ignored, but the <tt class="COMMAND">lpc 69 class</tt> command can be used to specify one or more classes 70 (actually glob patterns) to be printed. This facility can be 71 used to do support printing of jobs that require a specific 72 form setup. Here is a simple example of how to use this 73 facility.</p> 74 75 <p>Edit the printcap file so it has contents indicated below, 76 use <tt class="COMMAND">checkpc -f</tt> to check the 77 printcap, and then use <tt class="COMMAND">lpc reread</tt> to 78 restart the <b class="APPLICATION">lpd</b> server.</p> 79 80 <div class="INFORMALEXAMPLE"> 81 <a name="AEN3488"></a> 82<pre class="SCREEN"> 83 lp:force_localhost 84 lp:server 85 :sd=/var/spool/lpd/%P 86 :lp=lp2@localhost 87 lp2:force_localhost 88 lp2:server 89 :sd=/var/spool/lpd/%P 90 :lp=/tmp/lp2 91</pre> 92 </div> 93 Execute the following commands to print the <tt class= 94 "FILENAME">/tmp/hi</tt> file and observe the results: 95 96 <div class="INFORMALEXAMPLE"> 97 <a name="AEN3491"></a> 98<pre class="SCREEN"> 99 <samp class="PROMPT">h4: {249} %</samp> <kbd class= 100"USERINPUT">lpc class lp red</kbd> 101 Printer: lp@h4 102 classes printed 'red' 103 lp@h4.private: class updated 104 <samp class="PROMPT">h4: {250} %</samp> <kbd class= 105"USERINPUT">lpq</kbd> 106 Printer: lp@h4 (classes red) 107 Queue: no printable jobs in queue 108 <samp class="PROMPT">h4: {251} %</samp> <kbd class= 109"USERINPUT">lpr /tmp/hi</kbd> 110 <samp class="PROMPT">h4: {252} %</samp> <kbd class= 111"USERINPUT">lpq</kbd> 112 Printer: lp@h4 (classes red) 113 Queue: no printable jobs in queue 114 Holding: 1 held jobs in queue 115 Server: no server active 116 Rank Owner/ID Class Job Files Size Time 117 holdclass papowell@h4+82 A 82 /tmp/hi 3 09:29:52 118 <samp class="PROMPT">h4: {253} %</samp> <kbd class= 119"USERINPUT">lpr -Cred /tmp/hi</kbd> 120 <samp class="PROMPT">h4: {254} %</samp> <kbd class= 121"USERINPUT">lpq</kbd> 122 Printer: lp@h4 (classes red) 123 Queue: no printable jobs in queue 124 Holding: 1 held jobs in queue 125 Server: no server active 126 Status: job 'papowell@h4+89' removed at 09:30:13.569 127 Rank Owner/ID Class Job Files Size Time 128 holdclass papowell@h4+82 A 82 /tmp/hi 3 09:29:52 129</pre> 130 </div> 131 <br> 132 <br> 133 134 <p>As seen in the example, we set the queue class to <var 135 class="LITERAL">red</var>, and then sent a (default) class 136 <var class="LITERAL">A</var> job to the printer. It was not 137 printed, and is listed with <var class= 138 "LITERAL">holdclass</var> status. We sent another job which 139 was immediately printed.</p> 140 141 <p>We can change the print queue class at any time, and then 142 new class will then control what jobs are printed. To disable 143 the class selection, use the <tt class="COMMAND">lpc class 144 queue off</tt> command.</p> 145 146 <div class="INFORMALEXAMPLE"> 147 <a name="AEN3511"></a> 148<pre class="SCREEN"> 149 <samp class="PROMPT">h4: {255} %</samp> <kbd class= 150"USERINPUT">lpc class lp off</kbd> 151 Printer: lp@h4 152 all classes printed 153 lp@h4.private: class updated 154</pre> 155 </div> 156 <br> 157 <br> 158 </div> 159 160 <div class="NAVFOOTER"> 161 <hr align="LEFT" width="100%"> 162 163 <table summary="Footer navigation table" width="100%" border= 164 "0" cellpadding="0" cellspacing="0"> 165 <tr> 166 <td width="33%" align="left" valign="top"><a href= 167 "x3423.htm" accesskey="P">Prev</a></td> 168 169 <td width="34%" align="center" valign="top"><a href= 170 "index.htm" accesskey="H">Home</a></td> 171 172 <td width="33%" align="right" valign="top"><a href= 173 "x3515.htm" accesskey="N">Next</a></td> 174 </tr> 175 176 <tr> 177 <td width="33%" align="left" valign="top">Moving Jobs 178 From Queue to Queue and Redirecting Queues</td> 179 180 <td width="34%" align="center" valign="top"><a href= 181 "tutorial.htm" accesskey="U">Up</a></td> 182 183 <td width="33%" align="right" valign="top">Holding and 184 Releasing Jobs</td> 185 </tr> 186 </table> 187 </div> 188 </body> 189</html> 190 191