- Copyright and ISBN enhancements for the japanese version of the book
- Stuff mentioned on the errata page of the book - Many whitespace fixes - Some additional changes requested by Ted Mittelstaedt PR : docs/42473 Submitted by : Christian Brueffer <chris@unixpages.org>
This commit is contained in:
parent
fa29523aea
commit
1e57c3d640
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=14190
1 changed files with 110 additions and 102 deletions
|
@ -13,11 +13,17 @@
|
|||
</author>
|
||||
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<holder>Addison-Wesley Longman, Inc</holder>
|
||||
<year>2001</year>
|
||||
<holder>Addison-Wesley Longman, Inc (Original English language edition)</holder>
|
||||
</copyright>
|
||||
|
||||
<isbn>ISBN: 0-201-70481-1</isbn>
|
||||
<copyright>
|
||||
<year>2001</year>
|
||||
<holder>Pearson Educational Japan (Japanese langiage translation)</holder>
|
||||
</copyright>
|
||||
|
||||
<isbn>ENGLISH LANGUAGE EDITION ISBN: 0-201-70481-1</isbn>
|
||||
<isbn>JAPANESE LANGUAGE EDITION ISBN: 4-89471-464-7</isbn>
|
||||
|
||||
<legalnotice>
|
||||
<para>The eighth chapter of the book, <citetitle>The FreeBSD Corporate
|
||||
|
@ -69,7 +75,7 @@
|
|||
applications, and demand for it rapidly increased across the
|
||||
corporation. Large, high-capacity laser printers designed for office
|
||||
printing appeared on the scene. Printing went from 150 to 300 to
|
||||
600dpi for the common desktop laser printer.</para>
|
||||
600 dpi for the common desktop laser printer.</para>
|
||||
|
||||
<para>Today organizational network printing is complex, and printers
|
||||
themselves are more complicated. Most organizations find that sharing
|
||||
|
@ -103,7 +109,7 @@
|
|||
carriage return character must be added to the end of each line in
|
||||
raw text print output; otherwise, text prints in a
|
||||
<emphasis>stairstep</emphasis> output. (Some printers have hardware
|
||||
or software switches to do the conversion)</para>
|
||||
or software switches to do the conversion.)</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -173,9 +179,9 @@
|
|||
user. Although a single company holding control over a standard can
|
||||
guarantee compliance, it does significantly raise the cost of the
|
||||
printer. As a result, PostScript has not met with much success in
|
||||
lower-end laser and inkjet Windows printing market, despite the fact
|
||||
that Adobe distributes PostScript software operating system drivers
|
||||
for free.</para>
|
||||
the lower-end laser and inkjet Windows printing market, despite the
|
||||
fact that Adobe distributes PostScript software operating system
|
||||
drivers for free.</para>
|
||||
|
||||
<para>One issue that is a concern when networking PostScript printers
|
||||
is the selection of banner page, (also known as header page, or
|
||||
|
@ -396,7 +402,7 @@
|
|||
works identically to the external JetDirect units.</para>
|
||||
|
||||
<figure>
|
||||
<title>Printeserver in the printer</title>
|
||||
<title>Printserver in the printer</title>
|
||||
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
|
@ -591,15 +597,15 @@
|
|||
<title>Network Printing to Remote Spools</title>
|
||||
|
||||
<para>Although several proprietary network printing protocols such
|
||||
as Banyan Vines and NetWare, are tied to proprietary protocols,
|
||||
FreeBSD Unix can use two TCP/IP network printing protocols to
|
||||
as Banyan Vines and NetWare, are tied to proprietary network protocols,
|
||||
FreeBSD UNIX can use two TCP/IP network printing protocols to
|
||||
print to remote print spools. The two print protocols available
|
||||
on TCP/IP with FreeBSD are the open LPD protocol and the
|
||||
NetBIOS-over-TCP/IP Server Messaging Block (SMB) print protocol
|
||||
first defined by Intel and Microsoft and later used by IBM and
|
||||
Microsoft.</para>
|
||||
|
||||
<para>The LPD protocol is defined in RFC1179 This network protocol
|
||||
<para>The LPD protocol is defined in RFC1179. This network protocol
|
||||
is the standard print protocol used on all UNIX systems. LPD
|
||||
client implementations exist for all Windows operating systems and
|
||||
DOS. Microsoft has written LPD for the Windows NT versions, the
|
||||
|
@ -735,7 +741,7 @@
|
|||
<filename>PSCRIP.EXE</filename> which brought the PostScript
|
||||
driver to version 3.58 is no longer publicly available.) WfW
|
||||
already uses the more recent PostScript driver, as does Win31
|
||||
version A. Installing the Adobe Postscript driver for Win31 is
|
||||
version A. Installing the Adobe PostScript driver for Win31 is
|
||||
also an option. (see
|
||||
<ulink url="http://www.adobe.com/support/downloads/pdrvwin.htm">http://www.adobe.com/support/downloads/pdrvwin.htm</ulink>
|
||||
for the version 3.1.2 Win31 PostScript driver).</para>
|
||||
|
@ -744,7 +750,7 @@
|
|||
<step>
|
||||
<para>Look on the network adapter driver disk for the subdirectory
|
||||
<filename>nwclient/</filename> and then look for the ODI driver
|
||||
with the adapter card. For example, on the 3com 3C509/3C579
|
||||
for the adapter card. For example, on the 3com 3C509/3C579
|
||||
adapter driver disk, the driver and location are
|
||||
<filename>\NWCLIENT\3C5X9.COM</filename>. Copy this driver to
|
||||
the <filename>c:\nwclient</filename> directory.</para>
|
||||
|
@ -841,7 +847,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
<userinput>3c5x9</userinput>
|
||||
<userinput>tcpip</userinput></screen>
|
||||
|
||||
<para>The TCPIP driver should list the IP numbers and other
|
||||
<para>The TCP/IP driver should list the IP numbers and other
|
||||
information.</para>
|
||||
</step>
|
||||
|
||||
|
@ -880,8 +886,8 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
|
||||
<step>
|
||||
<para>Run <command>setup.exe</command> from the temporary
|
||||
directory containing the <filename>wlprs</filename> files
|
||||
are.</para>
|
||||
directory containing the <filename>wlprs</filename> files.
|
||||
</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -897,7 +903,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
</step>
|
||||
|
||||
<step>
|
||||
<para>On the Unix FreeBSD print spooler, make sure that there is
|
||||
<para>On the UNIX FreeBSD print spooler, make sure that there is
|
||||
an entry in <filename>/etc/hosts.lpd</filename> or
|
||||
<filename>/etc/hosts.equiv</filename> for the client
|
||||
workstation, thereby allowing it to submit jobs.</para>
|
||||
|
@ -1011,7 +1017,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
<step>
|
||||
<para>If the spooler is not started properly in some
|
||||
installations, there may be a bug. If placing the icon in the
|
||||
StartUp group doesen't actually start the spooler, the program
|
||||
Startup group doesn't actually start the spooler, the program
|
||||
name can be placed in the <literal>run=</literal> line of
|
||||
<filename>win.ini</filename>.</para>
|
||||
</step>
|
||||
|
@ -1033,7 +1039,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
Windows 95, but as a 16-bit program, it is far from an optimal
|
||||
implementation on a 32-bit operating system. In addition, Win95 and
|
||||
it's derivatives fundamentally changed from Windows 3.1 in the
|
||||
printing subystem. For these reasons I use a different LPR client
|
||||
printing subsystem. For these reasons I use a different LPR client
|
||||
program for Win95/98 LPR printing instructions. It is a full 32-bit
|
||||
print program, and it installs as a <emphasis>Windows 32-bit
|
||||
printer</emphasis> <emphasis>port monitor</emphasis>. The program
|
||||
|
@ -1085,7 +1091,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
starts printing the first page while the rest of the pages are
|
||||
building, timeouts at the network layer can sometimes cause very
|
||||
large jobs to abort. The entire job should be set to completely
|
||||
spool before the LPR client passes it to the Unix spooler. The
|
||||
spool before the LPR client passes it to the UNIX spooler. The
|
||||
problem is partly the result of program design: because ACITS is
|
||||
implemented as a local printer port instead of being embedded into
|
||||
Win95 networking (and available in Network Neighborhood) the program
|
||||
|
@ -1094,7 +1100,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
<para>The LPR program can be set to deselect banner/burst page
|
||||
printing if a PostScript printer that cannot support ASCII is used.
|
||||
The burst pages referred to here are NOT generated by the Windows
|
||||
machine. Use the instructions in Exhibit 8.3 to install</para>
|
||||
machine. Use the instructions in Exhibit 8.3 to install ACITS.</para>
|
||||
|
||||
<procedure>
|
||||
<title>LPR client on Win95/98 installation instructions</title>
|
||||
|
@ -1184,18 +1190,18 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
<para>If the printer is PostScript and cannot print ASCII, make
|
||||
sure that the "No banner page control flag" is checked to turn
|
||||
off banner pages. Accessible under Port settings, this flag is
|
||||
overridden if the <filename>/etc/printcap</filename>file
|
||||
overridden if the <filename>/etc/printcap</filename> file
|
||||
specifies no banner pages.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Review how the "send plain text control flag" is set. With
|
||||
this flag unchecked, the LPR code sent is L, (ie:, print
|
||||
this flag unchecked, the LPR code sent is L, (i.e., print
|
||||
unfiltered) meaning that the <literal>if</literal> filter gets
|
||||
called with the <option>-c</option> option. This is equivalent
|
||||
to the local invocation of <filename>/usr/bin/lpr -l</filename>.
|
||||
With the flag checked, the code is F, (formatted) meaning that
|
||||
the <literal>if</literal>filter gets called without the
|
||||
the <literal>if</literal> filter gets called without the
|
||||
<option>-c</option> option. This is equivalent to the default
|
||||
invocation <filename>/usr/bin/lpr</filename>. (This is also an
|
||||
issue under Windows NT, which retypes the print job to text if
|
||||
|
@ -1267,7 +1273,8 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
|
||||
<step>
|
||||
<para>In the Installed Network Software window, "Microsoft TCP/IP
|
||||
Printing" should be listed as well as "TCP/IP Protocol".</para>
|
||||
Printing" should be listed as well as "TCP/IP Protocol". If it
|
||||
is, stop here; otherwise continue.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -1390,7 +1397,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
</step>
|
||||
|
||||
<step>
|
||||
<para>3) Select the My Computer radio button, not the Network
|
||||
<para>Select the My Computer radio button, not the Network
|
||||
Print Server button and click <guibutton>Next</guibutton>. (The
|
||||
printer <emphasis>is</emphasis> a networked printer, it is
|
||||
managed on the local NT system. Microsoft used confusing
|
||||
|
@ -1442,7 +1449,8 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
Q150930. With Windows NT 3.51, and 4.0 up to service pack 1 the
|
||||
change is global. Starting with NT 4.0 Service pack 2 the change
|
||||
can be applied to specific print queues, (see Knowledge Base
|
||||
article ID Q168457).</para>
|
||||
article ID Q168457). This registry change also works for
|
||||
Windows 2000.</para>
|
||||
|
||||
<para>Under Windows NT 4.0, the change is:</para>
|
||||
|
||||
|
@ -1585,7 +1593,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Printing Postscript and DOS command files</title>
|
||||
<title>Printing PostScript and DOS command files</title>
|
||||
|
||||
<para>One problem with printing under Win31 and Win95 with the LPR
|
||||
methods discussed is the lack of a <quote>raw</quote>
|
||||
|
@ -1601,12 +1609,12 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
<para>Normally, under Windows printing, virtually all graphical programs
|
||||
print through the Windows printer driver. This is true even of basic
|
||||
programs such as Notepad. For example, an administrator may have a
|
||||
DOS batch file named <filename>filename.txt</filename>containing the
|
||||
DOS batch file named <filename>filename.txt</filename> containing the
|
||||
following line:</para>
|
||||
|
||||
<programlisting>echo \033&k2G > lpt1:</programlisting>
|
||||
|
||||
<para>This batch file switches a HP LasterJet from CR-LF, MS-DOS
|
||||
<para>This batch file switches a HP LaserJet from CR-LF, MS-DOS
|
||||
textfile printing into Newline termination UNIX textfile printing.
|
||||
Otherwise, raw text printed from UNIX on the HP prints with a
|
||||
stairstep effect.</para>
|
||||
|
@ -1690,7 +1698,7 @@ Bind 3C5X9 #1 Ethernet_II LAN_NET</programlisting>
|
|||
% printers.
|
||||
/buf 10 string def
|
||||
/CM {
|
||||
save statusdict/product get (Postscript) anchorsearch
|
||||
save statusdict/product get (PostScript) anchorsearch
|
||||
exch pop {length 0 eq
|
||||
{1}{2}ifelse
|
||||
}
|
||||
|
@ -1752,7 +1760,7 @@ showpage</programlisting>
|
|||
printers, as well as defined remote printers. Several programs also
|
||||
are used to manipulate jobs in the print spools that LPD manages, as
|
||||
well as the user programs to submit them from the UNIX command prompt.
|
||||
All of these programs use the <filename>/etc/printcap</filename>file,
|
||||
All of these programs use the <filename>/etc/printcap</filename> file,
|
||||
which is the master control file for the printing system.</para>
|
||||
|
||||
<para>Back when printing was mostly text, it was common to place
|
||||
|
@ -1775,19 +1783,19 @@ showpage</programlisting>
|
|||
description lines are often quite long, they are often written to span
|
||||
multiple lines by escaping intermediate newlines with the backslash
|
||||
(<literal>\</literal>) character. The
|
||||
<filename>/etc/printcap</filename>file, as supplied, defines a single
|
||||
printer queue, <literal>lp</literal>. The <literal>lp</literal>queue
|
||||
<filename>/etc/printcap</filename> file, as supplied, defines a single
|
||||
printer queue, <literal>lp</literal>. The <literal>lp</literal> queue
|
||||
is the default queue. Most UNIX-supplied printing utilities send
|
||||
print output to this queue if no printer is specified by the user. It
|
||||
should be set to point to the most popular print queue with
|
||||
<emphasis>local</emphasis> UNIX print users, (i.e.: users that have
|
||||
<emphasis>local</emphasis> UNIX print users, (i.e., users that have
|
||||
shell accounts).</para>
|
||||
|
||||
<para>The layout of <filename>/etc/printcap</filename>is covered in the
|
||||
<para>The layout of <filename>/etc/printcap</filename> is covered in the
|
||||
manual page, which is reached by running the <userinput>man
|
||||
printcap</userinput> command. The stock
|
||||
<filename>/etc/printcap</filename> file at the line defining the spool
|
||||
<literal>lp</literal>shows:</para>
|
||||
<literal>lp</literal> shows:</para>
|
||||
|
||||
<programlisting>#
|
||||
lp|local line printer:\
|
||||
|
@ -1829,7 +1837,7 @@ lp|local line printer:\
|
|||
lp|local line printer:\
|
||||
:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
|
||||
|
||||
NEC|NEC Silentwriter 95 Postscript printer:\
|
||||
NEC|NEC Silentwriter 95 PostScript printer:\
|
||||
:lp=/dev/lpt0:sd=/var/spool/output/NEC:lf=/var/log/lpd-errs:
|
||||
#</programlisting>
|
||||
|
||||
|
@ -1839,7 +1847,7 @@ NEC|NEC Silentwriter 95 Postscript printer:\
|
|||
directories <emphasis>must</emphasis> be different from each other,
|
||||
or the spooler gets confused and doesen't print.</para>
|
||||
|
||||
<para>After the <filename>/etc/printcap</filename>is modified, the
|
||||
<para>After the <filename>/etc/printcap</filename> is modified, the
|
||||
root user must create the <filename>/var/spool/output/NEC</filename>
|
||||
directory and assign ownership of it to the <username>bin</username>
|
||||
user, assign group ownership to <username>daemon</username>, and set
|
||||
|
@ -1869,7 +1877,7 @@ NEC|NEC Silentwriter 95 Postscript printer:\
|
|||
<listitem>
|
||||
<para>During FreeBSD installation, if the administrator knows a
|
||||
lot of print jobs are going to go through the spooler,
|
||||
<filename>/var</filename>should be set to a large
|
||||
<filename>/var</filename> should be set to a large
|
||||
amount of free space.</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -1877,7 +1885,7 @@ NEC|NEC Silentwriter 95 Postscript printer:\
|
|||
<para>Modify the <literal>sd</literal> capability in the
|
||||
<filename>/etc/printcap</filename> file to point to a spool
|
||||
directory in a different, larger filesystem, such as
|
||||
<filename>/usr/spool.</filename></para>
|
||||
<filename>/usr/spool</filename>.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -1896,7 +1904,7 @@ NEC|NEC Silentwriter 95 Postscript printer:\
|
|||
|
||||
<para>In addition to spools, the following other capabilities are
|
||||
usually placed in a production
|
||||
<filename>/etc/printcap</filename>file.</para>
|
||||
<filename>/etc/printcap</filename> file.</para>
|
||||
|
||||
<para>The entry <literal>fo</literal> prints a form feed when the
|
||||
printer is opened. It is handy for HPPCL (HP LaserJets) or other
|
||||
|
@ -1912,7 +1920,7 @@ NEC|NEC Silentwriter 95 Postscript printer:\
|
|||
grow far past the default print size of a megabyte. The original
|
||||
intent of this capability was to prevent errant programs from
|
||||
stuffing the spool with jobs so large that they would use up all
|
||||
paper in a printer.. Graphics-heavy print jobs have made it
|
||||
paper in a printer. Graphics-heavy print jobs have made it
|
||||
impossible to depend on this kind of space limitation, so
|
||||
<literal>mx</literal> is usually set to zero, which turns it
|
||||
off.</para>
|
||||
|
@ -1941,7 +1949,7 @@ NEC|NEC Silentwriter 95 Postscript printer:\
|
|||
<para>Hardware print server boxes, such as the HP JetDirect internal
|
||||
and external cards, need some additional capabilities defined in the
|
||||
<filename>/etc/printcap</filename> entry; <literal>rp</literal>, for
|
||||
remote print spool, and <literal>rm</literal>for remote machine
|
||||
remote print spool, and <literal>rm</literal> for remote machine
|
||||
name.</para>
|
||||
|
||||
<para>The <literal>rm</literal> capability is simply the DNS or
|
||||
|
@ -2012,7 +2020,7 @@ lp|local line printer:\
|
|||
|
||||
<para>The last two important printcap capabilities concern print
|
||||
filters, <literal>if</literal> (input filter) and
|
||||
<literal>of</literal> (output filter) If defined, incoming print
|
||||
<literal>of</literal> (output filter). If defined, incoming print
|
||||
jobs are run through the filters that these entries point to for
|
||||
further processing.</para>
|
||||
|
||||
|
@ -2034,7 +2042,7 @@ lp|local line printer:\
|
|||
want!</para>
|
||||
|
||||
<sect3>
|
||||
<title>Types of filters</title>
|
||||
<title>Types of Filters</title>
|
||||
|
||||
<para>Three types of filters can be defined in the
|
||||
<filename>/etc/printcap</filename> file. In this book all filter
|
||||
|
@ -2078,7 +2086,7 @@ lp|local line printer:\
|
|||
<sect4>
|
||||
<title>Output Filters</title>
|
||||
|
||||
<para>These are specified by the <literal>of</literal>capability.
|
||||
<para>These are specified by the <literal>of</literal> capability.
|
||||
Output filters are much more complicated than input filters and
|
||||
are hardly ever used in normal circumstances. They also
|
||||
generally require a compiled program somewhere, either directly
|
||||
|
@ -2088,9 +2096,9 @@ lp|local line printer:\
|
|||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Printing raw Unix text with a filter</title>
|
||||
<title>Printing Raw UNIX Text with a Filter</title>
|
||||
|
||||
<para>One of the first thing that a new Unix user will discover when
|
||||
<para>One of the first things that a new UNIX user will discover when
|
||||
plugging a standard LaserJet or impact printer into a UNIX system
|
||||
is the <emphasis>stairstep</emphasis> problem. The symptom is
|
||||
that the user dumps text to the printer, either through LPR or
|
||||
|
@ -2111,8 +2119,8 @@ lp|local line printer:\
|
|||
|
||||
<para>If the printer is a PostScript printer, and doesn't support
|
||||
standard ASCII, then dumping UNIX text to it doesn't work. But
|
||||
then, neither would dumping MS-DOS text to it. (Raw text printing
|
||||
on PostScript printers is discussed later in this chapter) Note
|
||||
then, neither would dumping MS-DOS text to it. (Raw text printing
|
||||
on PostScript printers is discussed later in this chapter.) Note
|
||||
also that if the printer is connected over the network to an HP
|
||||
JetDirect hardware print server, internal or external, the TEXT
|
||||
queue on the hardware print automatically adds the extra Carriage
|
||||
|
@ -2126,7 +2134,7 @@ lp|local line printer:\
|
|||
which makes the printer supply it's own carriage return. This
|
||||
solution is ugly in a printer environment with UNIX and Windows
|
||||
machines attempting to share use of the same printer. Switching
|
||||
the printer to work with Unix disrupts DOS/Windows raw text
|
||||
the printer to work with UNIX disrupts DOS/Windows raw text
|
||||
printouts.</para>
|
||||
|
||||
<para>The better solution is to use a simple filter that converts
|
||||
|
@ -2189,35 +2197,35 @@ lp|local line printer:\
|
|||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>The pr filter</title>
|
||||
<title>The <literal>pr</literal> filter</title>
|
||||
|
||||
<para>Although most filters are built by scripts or programs and are
|
||||
added to the UNIX machine by the administrator, there is one
|
||||
filter that is supplied with the FreeBSD operating system is very
|
||||
useful for raw text files: the <literal>pr</literal>filter. It is
|
||||
most commonly used when printing from the UNIX command shell. The
|
||||
useful for raw text files: the <literal>pr</literal> filter. It is
|
||||
most commonly used when printing from the UNIX command shell. The
|
||||
<literal>pr</literal> filter paginates and applies headers and
|
||||
footers to ASCII text files. It is automatically invoked with the
|
||||
<option>-p</option> option used with the <command>lpr</command>
|
||||
program at the UNIX command prompt.</para>
|
||||
|
||||
<para>The pr filter is special - it runs <emphasis>in
|
||||
<para>The <literal>pr</literal> filter is special - it runs <emphasis>in
|
||||
addition</emphasis> to any input filters specified for the print
|
||||
queue in <filename>/etc/printcap</filename>,
|
||||
<emphasis>if</emphasis> the user sets the option for a print job.
|
||||
This allows headers and pagination to be applied in addition to
|
||||
any special conversion, such as CR to LF that a specified input
|
||||
any special conversion, such as CR to CR/LF that a specified input
|
||||
filter may apply.</para>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Printing PostScript banner pages with a Filter.</title>
|
||||
<title>Printing PostScript Banner Pages with a Filter.</title>
|
||||
|
||||
<para>Unfortunately, the canned banner page supplied in the LPD
|
||||
program prints only on a text-compatible printer. If the attached
|
||||
printer understands only PostScript and the administrator wants to
|
||||
print banner pages, it is possible to install a filterinto the
|
||||
<filename>/etc/printcap</filename>file to do this.</para>
|
||||
print banner pages, it is possible to install a filter into the
|
||||
<filename>/etc/printcap</filename> file to do this.</para>
|
||||
|
||||
<para>The following filter is taken from the FreeBSD Handbook. I've
|
||||
slightly changed it's invocation for a couple of reasons. First,
|
||||
|
@ -2267,7 +2275,7 @@ sleep 10
|
|||
|
||||
cat && exit 0</programlisting>
|
||||
|
||||
<para>Here is the <filename>make-ps-header</filename>listing.</para>
|
||||
<para>Here is the <filename>make-ps-header</filename> listing.</para>
|
||||
|
||||
<programlisting>#!/bin/sh
|
||||
# Filename /usr/local/libexec/make-ps-header
|
||||
|
@ -2343,7 +2351,7 @@ showpage</programlisting>
|
|||
|
||||
<programlisting>#
|
||||
lp|local line printer, PostScript, banner:\
|
||||
:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
|
||||
:lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:\
|
||||
:if=/usr/local/libexec/psbanner:sh:mx#0:
|
||||
|
||||
lpnobanner|local line printer, PostScript, no banner:\
|
||||
|
@ -2399,9 +2407,9 @@ lpnobanner|local line printer, PostScript, no banner:\
|
|||
|
||||
<listitem>
|
||||
<para>The username of the submitter can be easily forged, if the job
|
||||
is remotely submitted over the network from a client. (practically
|
||||
is remotely submitted over the network from a client (practically
|
||||
all jobs in a Windows client printing environment are remotely
|
||||
submitted) Although some LPR clients can be set to authenticate,
|
||||
submitted). Although some LPR clients can be set to authenticate,
|
||||
and the <literal>rs</literal> capability can be set to enforce
|
||||
authentication, not all can, especially Windows LPR
|
||||
clients.</para>
|
||||
|
@ -2480,7 +2488,7 @@ lpnobanner|local line printer, PostScript, no banner:\
|
|||
model name of the printer, the "Auto printer driver install" feature
|
||||
of Windows NT and Win95/98 is activated. This automatically loads the
|
||||
correct printer driver if the user clicks on the print queue in
|
||||
Network Neighborhood under Windows 95 or NT 4.0 The restriction, of
|
||||
Network Neighborhood under Windows 95 or NT 4.0. The restriction, of
|
||||
course, is that the printer model must be in the Windows client driver
|
||||
database.</para>
|
||||
|
||||
|
@ -2562,7 +2570,7 @@ lpnobanner|local line printer, PostScript, no banner:\
|
|||
<title>Printer entries in configuration files</title>
|
||||
|
||||
<para>Following are listings of sample
|
||||
<filename>/etc/printcap</filename> file, and
|
||||
<filename>/etc/printcap</filename> and
|
||||
<filename>smb.conf</filename> files used on the system to provide
|
||||
print services. An explanation of the interaction of these files
|
||||
follows.</para>
|
||||
|
@ -2572,7 +2580,7 @@ lpnobanner|local line printer, PostScript, no banner:\
|
|||
|
||||
<programlisting>#
|
||||
#
|
||||
# The printer in lpt0 is a Postscript printer. The nec-crlf entry
|
||||
# The printer in lpt0 is a PostScript printer. The nec-crlf entry
|
||||
# is for testing the printer when it is switched into HP LaserJet III
|
||||
# mode.
|
||||
#
|
||||
|
@ -2583,7 +2591,7 @@ lp|local line printer:\
|
|||
|
||||
#
|
||||
|
||||
nec-crlf|NEC Silentwriter 95 in ASCII mode with Unix text filter:\
|
||||
nec-crlf|NEC Silentwriter 95 in ASCII mode with UNIX text filter:\
|
||||
:lp=/dev/lpt0:sd=/usr/lpdspool/nec-crlf:\
|
||||
:lf=/var/log/lpd-errs:sh:mx#0:\
|
||||
:if=/usr/local/libexec/crlfilter:tr=\f:
|
||||
|
@ -2596,7 +2604,7 @@ nec-raw|NEC Silentwriter 95 used for PostScript passthrough printing:\
|
|||
|
||||
#
|
||||
|
||||
nec-ps-banner|NEC Silentwriter 95 with Postscript banner page created:\
|
||||
nec-ps-banner|NEC Silentwriter 95 with PostScript banner page created:\
|
||||
:lp=/dev/lpt0:sd=/usr/lpdspool/nec-ps-banner:\
|
||||
:lf=/var/log/lpd-errs:sh:mx#0:if=/usr/local/libexec/psbanner:
|
||||
|
||||
|
@ -2646,7 +2654,7 @@ printable = yes
|
|||
browseable = no
|
||||
|
||||
[nec-raw]
|
||||
comment = Main Postscript printer driver for Windows clients
|
||||
comment = Main PostScript printer driver for Windows clients
|
||||
printer driver = NEC SilentWriter 95
|
||||
printable = yes
|
||||
browseable = yes
|
||||
|
@ -2670,7 +2678,7 @@ comment = Internal Web Server</programlisting>
|
|||
Sharename Type Comment
|
||||
--------------------------------------------------------------------
|
||||
nec-crlf Print NEC Silentwriter 95 in ASCII mode
|
||||
nec-raw Print Main Postscript printer driver
|
||||
nec-raw Print Main PostScript printer driver
|
||||
tedm Disk User Home Directory
|
||||
wwwroot Disk Internal Web Server
|
||||
|
||||
|
@ -2681,8 +2689,8 @@ The command was completed successfully.</screen>
|
|||
on the FreeBSD server. The first is <literal>lp</literal>, the
|
||||
generic local line printer. Since this print queue generally has a
|
||||
filter placed on it to format jobs from the UNIX print queue
|
||||
properly, it should not be visible on the SMB network. (ie: visible
|
||||
in Network Neighborhood) The second queue,
|
||||
properly, it should not be visible on the SMB network (i.e., visible
|
||||
in Network Neighborhood). The second queue,
|
||||
<literal>nec-crlf</literal>, has a filter that converts UNIX text to
|
||||
text that prints without stairstepping, so it also should be hidden
|
||||
from the SMB network. The third, <literal>nec-raw</literal>, should
|
||||
|
@ -2696,16 +2704,16 @@ The command was completed successfully.</screen>
|
|||
as a set of defaults for printers that are going to be shared out.
|
||||
Next, the <filename>/etc/printcap</filename> file is read to get a
|
||||
list of all printers on the server. Last, each printer is checked
|
||||
for a service name in the <filename>smb.conf</filename>file that
|
||||
for a service name in the <filename>smb.conf</filename> file that
|
||||
contains settings that override the set of defaults.</para>
|
||||
|
||||
<para>In the listing of what resources are visible on the network,
|
||||
both <literal>nec-crlf</literal> and <literal>nec-raw</literal>
|
||||
print queues are visible, and <literal>lp</literal>and
|
||||
print queues are visible, and <literal>lp</literal> and
|
||||
<literal>nec-ps-banner</literal> is not. <literal>lp</literal> is
|
||||
not visible because there is a specific entry,
|
||||
<literal>[lp]</literal> in the <filename>smb.conf</filename> file
|
||||
that blocks it. <literal>nec-ps-banner</literal> doesen't have such
|
||||
that blocks it. <literal>nec-ps-banner</literal> doesn't have such
|
||||
an entry, but because the print queue name is not a legal length for
|
||||
a SMB name, it isn't shared out either.</para>
|
||||
|
||||
|
@ -2728,7 +2736,7 @@ The command was completed successfully.</screen>
|
|||
and Windows NT printing interoperability with NT as a print client
|
||||
passing jobs to the FreeBSD system. What happens if the situation is
|
||||
reversed and the FreeBSD system is itself a printing client of another
|
||||
LPD server? This situation can arise in a mixed UNIX/Netware or
|
||||
LPD server? This situation can arise in a mixed UNIX/NetWare or
|
||||
UNIX/NT environment. The administrator may elect to forgo the use of
|
||||
Samba, and use an NT server to provide print services. Alternatively,
|
||||
the administrator may have existing DOS Novell IPX clients that they
|
||||
|
@ -2749,8 +2757,8 @@ The command was completed successfully.</screen>
|
|||
remotely from an NT server that has LPR installed as a port for it's
|
||||
printers.</para>
|
||||
|
||||
<para>Following is a sample <filename>/etc/printcap</filename>file entry
|
||||
that defines a print queue named <literal>tank</literal>on the FreeBSD
|
||||
<para>Following is a sample <filename>/etc/printcap</filename> file entry
|
||||
that defines a print queue named <literal>tank</literal> on the FreeBSD
|
||||
system pointed to an NT LPD server queue named
|
||||
<literal>sherman</literal> on a NT Server named
|
||||
<hostid role="fqdn">big.army.mil</hostid> in the DNS. This uses the
|
||||
|
@ -2772,11 +2780,11 @@ tank|sample remote printer:\
|
|||
</sect1>
|
||||
|
||||
<sect1>
|
||||
<title>Printing from Unix</title>
|
||||
<title>Printing from UNIX</title>
|
||||
|
||||
<para>Two commands used at the FreeBSD command prompt are intended as
|
||||
general-purpose print commands: <command>lp</command> and
|
||||
<command>lpr.</command>.</para>
|
||||
<command>lpr</command>.</para>
|
||||
|
||||
<sect2>
|
||||
<title><command>lp</command></title>
|
||||
|
@ -2806,8 +2814,8 @@ tank|sample remote printer:\
|
|||
administrator usually sets the <literal>lp</literal> queue to print
|
||||
through a filter that allows raw UNIX text sent to it to print
|
||||
properly. For example, if an HP LaserJet printer that doesn't have
|
||||
Postscript is connected to the server, the
|
||||
<literal>lp</literal>queue specifies in the
|
||||
PostScript is connected to the server, the
|
||||
<literal>lp</literal> queue specifies in the
|
||||
<filename>/etc/printcap</filename> file the CRLF filter listed
|
||||
earlier. On the other hand, if an Apple Laserwriter that doesn't
|
||||
support ASCII is connected to the server, the
|
||||
|
@ -2823,7 +2831,7 @@ tank|sample remote printer:\
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Managing the Unix Print Queue</title>
|
||||
<title>Managing the UNIX Print Queue</title>
|
||||
|
||||
<para>Once the print jobs coming in from clients are received on the
|
||||
FreeBSD system and placed in the print spool, they are metered out
|
||||
|
@ -2833,7 +2841,7 @@ tank|sample remote printer:\
|
|||
However, a busy network printer running at an optimal rate of speed
|
||||
usually has a backlog of unprinted jobs in the queue waiting for
|
||||
print time. To keep all users happy and to provide for the
|
||||
occasional rush print job, the Unix LPD/LPR printing system has
|
||||
occasional rush print job, the UNIX LPD/LPR printing system has
|
||||
several administration commands which are described here.</para>
|
||||
|
||||
<sect3>
|
||||
|
@ -2850,7 +2858,7 @@ tank|sample remote printer:\
|
|||
queues are on and view them there.</para>
|
||||
|
||||
<para>The UNIX shell command used to view the queue is the
|
||||
<command>lpq</command> command It is frequently run as
|
||||
<command>lpq</command> command. It is frequently run as
|
||||
<userinput>lpq -a</userinput> which shows jobs in all queues. The
|
||||
following is a sample output of the command:</para>
|
||||
|
||||
|
@ -2873,7 +2881,7 @@ Rank Owner Job Files Total Size
|
|||
<para>Deleting unwanted print jobs that haven't yet printed from the
|
||||
queue can be done by the remote workstations that submitted the
|
||||
job if their LPR implementations have the necessary commands. The
|
||||
Windows 3.1 LPR client I detailed earlier this capability. Many
|
||||
Windows 3.1 LPR client I detailed earlier has this capability. Many
|
||||
LPR clients don't, however, which means that the administrator
|
||||
must Telnet into the UNIX machine that the print queues are on and
|
||||
delete the jobs there.</para>
|
||||
|
@ -2975,9 +2983,9 @@ Rank Owner Job Files Total Size
|
|||
<para>Just as the root user can manipulate remotely submitted jobs
|
||||
in the print queue, print jobs can be remotely managed by regular
|
||||
users with the LPR clients that created them. Unfortunately, some
|
||||
LPR clients, such as Win95, don't have enough programming to be
|
||||
able to do this. Others, like the Win31 client, can manipulate
|
||||
the print jobs remotely.</para>
|
||||
LPR clients, such as the ACITS LPR client for Win95, don't have
|
||||
enough programming to be able to do this. Others, like the Win31
|
||||
client, can manipulate the print jobs remotely.</para>
|
||||
|
||||
<para>FreeBSD offers some level of protection against inadvertent
|
||||
deletion of print jobs from remote hosts by restricting
|
||||
|
@ -3016,8 +3024,8 @@ Rank Owner Job Files Total Size
|
|||
<para>The Ghostscript home page is located at
|
||||
<ulink url="http://www.cs.wisc.edu/~ghost/">http://www.cs.wisc.edu/~ghost/</ulink>
|
||||
and contains the most current version of the program. A prebuilt
|
||||
FreeBSD binary of Ghostscript located in the Packages section of the
|
||||
FreeBSD CDROM. This can be installed on the FreeBSD system by
|
||||
FreeBSD binary of Ghostscript is located in the Packages section of
|
||||
the FreeBSD CDROM. This can be installed on the FreeBSD system by
|
||||
selecting the package from the prepackaged software list that is
|
||||
accessed through the <command>/stand/sysinstall</command>
|
||||
installation program. Many packaged programs on the CD depend on
|
||||
|
@ -3044,15 +3052,15 @@ Rank Owner Job Files Total Size
|
|||
|
||||
<procedure>
|
||||
<step>
|
||||
<para>Change to the root user with su.</para>
|
||||
<para>Change to the root user with <command>su</command>.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>In the <filename>gs5.03</filename>directory, copy the
|
||||
<para>In the <filename>gs5.03</filename> directory, copy the
|
||||
<filename>lprsetup.sh</filename>,
|
||||
<filename>unix-lpr.txt</filename>, and
|
||||
<filename>unix-lpr.sh</filename> files to
|
||||
<filename>/usr/local/share/ghostscript/5.03</filename></para>
|
||||
<filename>/usr/local/share/ghostscript/5.03</filename>.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -3065,7 +3073,7 @@ Rank Owner Job Files Total Size
|
|||
<step>
|
||||
<para>Modify the <literal>DEVICES=</literal> entries
|
||||
to list your selected printer driver definitions per the
|
||||
instructions in <filename>unix-lpr.txt.</filename></para>
|
||||
instructions in <filename>unix-lpr.txt</filename>.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -3085,7 +3093,7 @@ Rank Owner Job Files Total Size
|
|||
<step>
|
||||
<para>If the printer that you defined in the
|
||||
<filename>lprsetup.sh</filename> file is a monochrome printer,
|
||||
remove the <literal>"-dBitsPerPixel=${bpp}"</literal>and
|
||||
remove the <literal>"-dBitsPerPixel=${bpp}"</literal> and
|
||||
<literal>"$colorspec"</literal> entries on the
|
||||
<literal>gs</literal> invocation line and save the file.
|
||||
Otherwise, if it is a color definition leave them in. For
|
||||
|
@ -3106,7 +3114,7 @@ Rank Owner Job Files Total Size
|
|||
<step>
|
||||
<para>Set the execute bit on <filename>lprsetup.sh</filename> with
|
||||
chmod and run the file by typing
|
||||
<userinput>./lprsetup.sh</userinput></para>
|
||||
<userinput>./lprsetup.sh</userinput>.</para>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
|
@ -3146,8 +3154,8 @@ ljet3|Ghostscript device ljet3 (output to ljet3.raw):\
|
|||
<sect2>
|
||||
<title>a2ps filter</title>
|
||||
|
||||
<para>Another handy utility is the <command>a2ps</command>, short for
|
||||
ASCII-to-PostScript. This program takes an incoming ASCII
|
||||
<para>Another handy utility is the <command>a2ps</command> filter, short
|
||||
for ASCII-to-PostScript. This program takes an incoming ASCII
|
||||
datastream and converts it into PostScript. It can also print
|
||||
multiple pages on a single sheet of paper by shrinking them down. It
|
||||
is a useful tool for a printer that cannot interpret ASCII, such as
|
||||
|
@ -3176,7 +3184,7 @@ lp|local line printer with output dumped through a2ps for raw listings:\
|
|||
|
||||
<programlisting>#!/bin/sh
|
||||
#
|
||||
# Simple filter that converts ASCII to Postscript for basic stuff like
|
||||
# Simple filter that converts ASCII to PostScript for basic stuff like
|
||||
# directory listings.
|
||||
#
|
||||
|
||||
|
|
Loading…
Reference in a new issue