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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Print Spooling Tutorial</title>
<meta name="GENERATOR" content=
"Modular DocBook HTML Stylesheet Version 1.71 ">
<link rel="HOME" title=" LPRng-HOWTO" href="index.htm">
<link rel="PREVIOUS" title="AppleTalk Support " href=
"appletalk.htm">
<link rel="NEXT" title="Sample Printcap Entry" href=
"sampleprintcap.htm">
</head>
<body class="CHAPTER" 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=
"appletalk.htm" accesskey="P">Prev</a></td>
<td width="80%" align="center" valign="bottom">
</td>
<td width="10%" align="right" valign="bottom"><a href=
"sampleprintcap.htm" accesskey="N">Next</a></td>
</tr>
</table>
<hr align="LEFT" width="100%">
</div>
<div class="CHAPTER">
<h1><a name="TUTORIAL">Chapter 4. Print Spooling
Tutorial</a></h1>
<div class="TOC">
<dl>
<dt><b>Table of Contents</b></dt>
<dt>4.1. <a href=
"tutorial.htm#OVERVIEW">Overview</a></dt>
<dt>4.2. <a href="sampleprintcap.htm">Sample Printcap
Entry</a></dt>
<dt>4.3. <a href="tutorialconfig.htm">Setting Up the
Tutorial Configuration</a></dt>
<dt>4.4. <a href="restoring.htm">Restoring Original
Configuration</a></dt>
<dt>4.5. <a href="printingandchecking.htm">Printing a
File and Checking Status</a></dt>
<dt>4.6. <a href="selectingprintqueue.htm">Selecting the
Print Queue</a></dt>
<dt>4.7. <a href="controllingprintqueue.htm">Controlling
the Print Queue</a></dt>
<dt>4.8. <a href="jobremoval.htm">Job Removal</a></dt>
<dt>4.9. <a href="printjobfilters.htm">Print Job
Filters</a></dt>
<dt>4.10. <a href="jobfileformatconversion.htm">Job File
Format Conversion with Filters</a></dt>
<dt>4.11. <a href="x3050.htm">Printcap Basics</a></dt>
<dt>4.12. <a href="x3220.htm">Banner Printing and the OF
filter</a></dt>
<dt>4.13. <a href="x3323.htm">Printing from <b class=
"APPLICATION">lpr</b> Directly To A Device</a></dt>
<dt>4.14. <a href="x3370.htm">Moving Jobs From Queue to
Queue and Redirecting Queues</a></dt>
<dt>4.15. <a href="x3417.htm">Print Job Classes, User
Requested Job Priority, and Form Support</a></dt>
<dt>4.16. <a href="x3462.htm">Holding and Releasing
Jobs</a></dt>
<dt>4.17. <a href="x3540.htm">Load Balance Queues and
Printer Pools</a></dt>
<dt>4.18. <a href="x3641.htm">Routing Jobs To Print
Queues</a></dt>
<dt>4.19. <a href="x3714.htm">Job Options and the Z
Control File Entry</a></dt>
<dt>4.20. <a href="x3832.htm">Interfacing to Non-LPRng
Spoolers</a></dt>
<dt>4.21. <a href="x3864.htm">Debugging, Tracing, and Log
Files</a></dt>
</dl>
</div>
<p>A print spooler is a program that accepts <i class=
"EMPHASIS">print jobs</i> (which are usually one or more
files) from a program or network interface, stores them in a
<i class="EMPHASIS">spool queue</i>, and then sends them to a
printer or another print spooler. Usually there are
facilities to submit jobs, check on the current job status,
remove jobs from spool queues, and perform administrative
functions such as starting or stopping printing.</p>
<p>A print spooler is a client/server application. The client
programs are used to submit jobs to the print spooler program
which performs the actual printing operations. In order to
carry out these operations, the server may need to use other
programs to convert print job files into a format acceptable
to a printer, or perform various accounting or administrative
functions.</p>
<div class="SECT1">
<h1 class="SECT1"><a name="OVERVIEW">4.1. Overview</a></h1>
<div class="INFORMALEXAMPLE">
<a name="AEN1615"></a>
<pre class="SCREEN">
+---------+ +-----+ +-----+ +--------+ +---------+
| program | -> | lpr | -> | lpd | -> | filter | -> | printer |
+---------+ +-----+ * +-----+ +--------+ +---------+
* * |
printcap V
+-----+ +--------+ +---------+
| lpd | -> | filter | -> | printer |
+-----+ +--------+ +---------+
Figure 1
</pre>
</div>
<br>
<br>
<p>Figure 1 shows the flow of data between the individual
components of the <b class="APPLICATION">LPRng</b> print
spooling system. A program (or user) will use the <b class=
"APPLICATION">lpr</b> program to send a file to the <b
class="APPLICATION">lpd</b> server over a TCP/IP
connection. The <b class="APPLICATION">lpd</b> server will
store the file temporarily in a spool queue directory. The
information needed by the <b class="APPLICATION">lpr</b>
and <b class="APPLICATION">lpd</b> programs to carry out
this activity is stored in the <tt class=
"FILENAME">printcap</tt> (usually called the <tt class=
"FILENAME">/etc/printcap</tt>) database file.</p>
<p>The <b class="APPLICATION">lpd</b> server sorts the
queue entries and determines the print order. It will
select a job to be printed, open a connection to the
printer, and then use a <i class="EMPHASIS">filter</i>
program to convert the file contents into a format suitable
for the printer. If the file does not need conversion, then
the <b class="APPLICATION">lpd</b> server will send the
file directly to the printer.</p>
<p>The <b class="APPLICATION">lpd</b> server can also <i
class="EMPHASIS">forward</i> jobs to another print server
over a network connection, optionally sending them through
a filter as well. The destination server can in turn
forward the job or send it to a printer.</p>
<p>The protocol or commands used to do this job forward and
transfer are specified by <a href=
"rfc1179ref.htm">RFC1179</a>. This protocol specifies how
the <b class="APPLICATION">lpr</b> client program sends a
job to the <b class="APPLICATION">lpd</b> server, as well
as how the <b class="APPLICATION">lpd</b> server forwards
jobs to another server. In addition to job submission,
RFC1179 specifies commands to obtain queue status, to
remove jobs from the queue, and to start and stop print
queues.</p>
</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=
"appletalk.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=
"sampleprintcap.htm" accesskey="N">Next</a></td>
</tr>
<tr>
<td width="33%" align="left" valign="top">AppleTalk
Support</td>
<td width="34%" align="center" valign="top"> </td>
<td width="33%" align="right" valign="top">Sample
Printcap Entry</td>
</tr>
</table>
</div>
</body>
</html>
|