/usr/share/doc/lprng-doc/LPRng-Reference-Multipart/sampleprintcap.htm is in lprng-doc 3.8.A~rc2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
<title>Sample Printcap Entry</title>
<meta name="GENERATOR" content=
"Modular DocBook HTML Stylesheet Version 1.79">
<link rel="HOME" title=" LPRng Reference Manual" href=
"index.htm">
<link rel="UP" title="Print Spooling Tutorial " href=
"tutorial.htm">
<link rel="PREVIOUS" title="Print Spooling Tutorial " href=
"tutorial.htm">
<link rel="NEXT" title="Setting Up the Tutorial Configuration"
href="tutorialconfig.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 Reference Manual: 24
Sep 2004 (For LPRng-3.8.28)</th>
</tr>
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"tutorial.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=
"tutorialconfig.htm" accesskey="N">Next</a></td>
</tr>
</table>
<hr align="left" width="100%">
</div>
<div class="SECT1">
<h1 class="SECT1"><a name="SAMPLEPRINTCAP" id=
"SAMPLEPRINTCAP">4.2. Sample Printcap Entry</a></h1>
<p>As described in the <a href="tutorial.htm#OVERVIEW">Print
Spooling Overview</a>, the information in the <tt class=
"FILENAME">printcap</tt> database is used control printing
operations. While there is no RFC specifying its format or
content, there is a strong <span class="emphasis"><i class=
"EMPHASIS">de facto</i></span> standard for its format. For a
complete description of the <tt class="FILENAME">printcap</tt>
database see <a href="printcapref.htm">Printcap Database</a>.
For a list of all of the <tt class="FILENAME">printcap</tt> and
configuration options see <a href="optionindex.htm">Index To
All The Configuration and Printcap Options</a>.</p>
<p>Here is a sample printcap suitable for use by the <b class=
"APPLICATION">LPRng</b> clients:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN1701" id="AEN1701"></a>
<pre class="SCREEN">
LPRng use :lp for destination (device and spool queue)
lp:lp=lp@h4.private
lpreal:lp=/dev/lp0
Vintage BSD uses :rp:rm for spooler queue and :lp for device
lp:rp=lp:rm=h4.private
lpdev:lp=/dev/lp0
</pre>
</div>
<p>The <tt class="LITERAL">:lp=lp@h4.private</tt> printcap
entry tells the <span class="emphasis"><i class=
"EMPHASIS">client</i></span> programs that jobs for the
<b class="APPLICATION">lp</b> printer or print queue are sent
to the <b class="APPLICATION">lp</b> print queue queue on host
<tt class="FILENAME">h4.private</tt>. This can also be
specified using the The <span class="emphasis"><i class=
"EMPHASIS">legacy</i></span> BSD <tt class="LITERAL">:rp</tt>
and <tt class="LITERAL">:rm</tt>. The <tt class=
"LITERAL">:rp=</tt><span class="emphasis"><i class=
"EMPHASIS">queue</i></span> option specifies the <span class=
"emphasis"><i class="EMPHASIS">print queue</i></span>
<tt class="LITERAL">:rm=</tt><span class="emphasis"><i class=
"EMPHASIS">host</i></span> option specifies the host. When both
<tt class="LITERAL">lp</tt> and <tt class="LITERAL">:rp:rm</tt>
are present the <tt class="LITERAL">:lp</tt> option has
precedence.</p>
<p>On the printserver the following is a sample printcap entry
suitable for the <b class="APPLICATION">lpd</b> server:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN1722" id="AEN1722"></a>
<pre class="SCREEN">
lp:
:lp=/dev/lp0
:sd=/var/spool/lpd/%P
:filter=/usr/local/libexec/filters/ifhp
</pre>
</div>
<p>The <tt class="LITERAL">:sd=</tt><span class=
"emphasis"><i class="EMPHASIS">directory</i></span> option
(spool queue directory) specifies the directory where print
jobs will be placed. The <tt class="LITERAL">%P</tt> will be
replaced with the name of the spool queue. The <tt class=
"LITERAL">:lp</tt> literal is now the path to the output device
the <b class="APPLICATION">lpd</b> server will use to print the
job. The <tt class="LITERAL">:filter</tt> literal specifies the
filter program to use to process the job before sending to the
output device.</p>
<p>Here is another example of a printcap entry using the
<tt class="LITERAL">%P</tt> notation:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN1733" id="AEN1733"></a>
<pre class="SCREEN">
lp:lp=%P@h4.private
</pre>
</div>This entry will cause all jobs sent to the <tt class=
"LITERAL">lp</tt> spool queue to be sent to the <tt class=
"LITERAL">lp</tt> queue on <tt class="LITERAL">server</tt>.
<tt class="LITERAL">%X</tt> strings in the printcap entries are
expanded as shown:
<div class="INFORMALTABLE">
<a name="AEN1739" id="AEN1739"></a>
<table border="1" frame="border" rules="all" class=
"CALSTABLE">
<col>
<col>
<thead>
<tr>
<th>Key</th>
<th>Replaced By</th>
</tr>
</thead>
<tbody>
<tr>
<td><tt class="LITERAL">%P</tt></td>
<td>printcap entry primary name (printer)</td>
</tr>
<tr>
<td><tt class="LITERAL">%Q</tt></td>
<td>queue requested</td>
</tr>
<tr>
<td><tt class="LITERAL">%h</tt></td>
<td>short host name (host)</td>
</tr>
<tr>
<td><tt class="LITERAL">%H</tt></td>
<td>fully qualified host name (host.dns.whatever)</td>
</tr>
<tr>
<td><tt class="LITERAL">%R</tt></td>
<td>remote printer (rp value)</td>
</tr>
<tr>
<td><tt class="LITERAL">%M</tt></td>
<td>remote host (rm value)</td>
</tr>
<tr>
<td><tt class="LITERAL">%D</tt></td>
<td>date in YYYY-MM-DD format</td>
</tr>
</tbody>
</table>
</div>
</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=
"tutorial.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=
"tutorialconfig.htm" accesskey="N">Next</a></td>
</tr>
<tr>
<td width="33%" align="left" valign="top">Print Spooling
Tutorial</td>
<td width="34%" align="center" valign="top"><a href=
"tutorial.htm" accesskey="U">Up</a></td>
<td width="33%" align="right" valign="top">Setting Up the
Tutorial Configuration</td>
</tr>
</table>
</div>
<p align="center"></p>
</body>
</html>
|