Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 42 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
42
Dung lượng
300,25 KB
Nội dung
Print Services
T
his chapter covers everything you need to know about
the Windows 2000 printing service. Despite all of our
efforts to create a paperless office, printers are not going
away. And for all intents and purposes, for good or for evil,
printers are becoming more sophisticated, cheaper, and
easier to use every day.
New technologies like e-mail and the World Wide Web have
not done much to alleviate the need for printers. Instead they
have often succeeded in shifting the burden of hardcopy out-
put from the sender to the receiver. These days, even attor-
neys e-mail you contracts—and then ask you to print them
out, sign, and return them.
The network operating system lives and dies by its ability
to host access to printers. The print service is the third leg
of the “stool” that makes up a network operating system.
Without it, a network OS simply falls over. Windows 2000 has
inherited a rich and robust printing service, culled from years
of R&D and the experiences of over a hundred million users.
It may seem like installing printers and printing is a no-
brainer. For the large part it is—until the printer stops print-
ing. You need to have a good understanding of the elements
and components of Windows networking services to trou-
bleshoot this vital facility.
As an administrator, you need to understand the logical envi-
ronment in order to troubleshoot printer problems effectively.
Therefore, we’ll start by introducing the components that
make printing actually happen. Later, we’ll discuss installing
printers, and you’ll find that the properties and parameters
you set up will mean more to you. Finally, you’ll be able to
explore print service troubleshooting, once you’re equipped
with the fundamentals.
23
23
CHAPTER
✦✦✦✦
In This Chapter
Installing and
Managing Printers
Adding, Setting Up,
and Publishing
Printers
Sharing Printers,
Permissions, and
Ownership
Strategies for
Effectively Managing
and Troubleshooting
Printer Services
✦✦✦✦
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 829
830
Part VI ✦ File, Print, and Web Services
You should understand that the components we’ll discuss now are extremely com-
plex objects and APIs that make up the Windows 2000 (actually, it’s still NT) print
service. In this book, our purpose is to provide you with enough information to
visualize the components, and therefore be able to solve printing problems in
Windows 2000 environments in an effective manner.
Understanding Windows 2000
Printer Services
To help you avoid getting hung up on terminology and concepts later, you should
probably look at the printer services from two different points of view—the logical
environment and the physical environment. The logical environment is an abstrac-
tion of the physical device that the user sees. It includes the software required to
interface to the physical environment. The physical environment represents the
devices out of which the final printed medium (usually paper) emerges.
Printer Services: The Logical Environment
First of all, printers have no user interface other than a cryptic keypad and a small
LCD screen. Their job is to receive data and to convert the data into information that
a printer’s electronics understands. The printer language or software lays out the
page according to specifications in the data and goes about the task of sending this
information out to the physical parts that print the images onto a hard medium.
So if you are not able to print, and all the logical printer components check out, the
only course of action, once a faulty printer has been detected, is to ship it back to
the factory or call a service technician (assuming you know little about corona
wires, drums, and hoppers). For the most part, you need only know how to turn
the printer or plotter on and off, change toner and paper, connect its interface
cables, and clean it.
Windows 2000, on the other hand, is both printer-aware and user-aware. Its task is
to provide a logical printer interface that users can see and managers can manage
and troubleshoot, as well as a holistic printer spooling and pooling environment.
The logical printer, represented by the printer object, its icons, and properties, is
representative of the hardware. The printer icon, or the printer share, is all knowl-
edge workers need to know about printing.
You can install logical printers on your client computers (local printers), but most
of the time the logical printers are installed on servers dedicated to hosting logical
printers (network printers).
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 830
831
Chapter 23 ✦ Print Services
The following list describes the basic user procedure to connect to and use a
printer:
1. Install a logical local or remote printer you have access to (the installation is
persistent).
2. Once connected, you can manage certain properties of the logical printer,
such as paper size and layout, bins and trays, resolution and color, number
of pages and copies, and so on.
3. You, or at least your users, then print documents and graphics to the logical
printer. The action of printing is often called a job. The job encapsulates print-
ing instructions for the printer service, telling the logical printer how the job
should be printed to the physical printer. When a client application prints a
document or image, the application calls the Windows graphic device inter-
face (GDI), which loads the driver for the target printer. (The driver is down-
loaded from the server if it does not exist on the client machine. On Windows
2000 clients, the drivers get downloaded at every print job.)
Using the driver for the target printer, the GDI renders the document in the
printer language of the physical printer. Once complete, the GDI then calls the
local spooler, hands off the jobs, and closes. At this point, the GDI’s work is
done, and the client computer sends the job to the print server, via a routing
service. The routing service transports the print job over the network using
the remote procedure call service, the NetBIOS redirector, or other service
(in the case of Unix ,OS/2, and so on).
4. The logical printer, also called the printer service or client spooler, once it has
received the job from a print router or other interface, also loads the neces-
sary driver, which tells it how to interface to the physical printer and how to
send it the document. This is done via the services of print providers and
processors.
5. The print processor checks the job’s data types and alters them or leaves
them alone depending on the requirements and the data types received. The
print processor makes sure the jobs print correctly.
6. If the data types call for separator page processing, the jobs are handed off
to the separator page processor. The separator page is added to the front of
the job.
7. Meanwhile, as the printer administrator, you’ll manage the logical printer’s
properties (the logical printer is an object), such as where it resides on the
network, who has access to it, when they can use it, and so on.
The printer service, illustrated in Figure 23-1, includes several components and
concepts, which are described in the following sections.
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 831
832
Part VI ✦ File, Print, and Web Services
Figure 23-1: The Windows 2000 Print Service represented as
a stack of services
Print routers
Print routers sit between the client application and the print server (which can also
be on the local machine, if printing to the parallel or serial port). The first job of the
router is to route print jobs to the correct servers and print services. The second
job of the router, once the target server is found, is to make sure the client has the
correct driver for the job. The router will check the target server’s driver with the
client’s, and if the client’s driver is older or absent, the router will update the driver
on the client machine.
Routers are usually Win32 services. In other words, they cater to Windows printing.
All other network clients, such as UNIX, OS/2, Midrange systems, and the Mac
environment, get their jobs to the Windows 2000 print service via APIs that inter-
face directly with the server service stack.
Printer drivers
These are the first variable components you are asked to provide when setting up
logical printers. Printer drivers are the software components that are sent to the
user’s software to allow it to create print jobs according to the capabilities of the
target printers.
Note
Router
Spooler
Non-Windows print clients
Host Windows
2000 Print Server
Remote Print Provider
Win 32 Printing
Local Print Provider
Print Processor
Page Processor
Print Monitor
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 832
833
Chapter 23 ✦ Print Services
Printer drivers are built for specific printers or printer families. For example, you
need a printer driver for jobs printed to the Hewlett Packard LaserJet III printers
and different drivers for jobs printed to LaserJet 4 and LaserJet 5 printers respec-
tively. However, LaserJet 4 and 5 drivers will be able to print standard jobs printed
to the LaserJet III printers, but the older LaserJet III printers may not print a com-
plex job generated by the LaserJet 4 or 5 driver.
Printer drivers are installed when you install and configure logical printing devices.
You can also select alternative drivers after the logical printer has been installed.
This is discussed later in this chapter.
Printer drivers are stored in the
\system32\spool\drivers\ folder. Information
about the drivers is stored in the Registry of the hosting machine.
The drivers are grouped into raster printer drivers, which include the PCL standard
and dot matrix printers and PostScript printer drivers, which are typically used for
high-end graphics and publishing applications, the domain of the Apple/Mac com-
puters and printers.
The spooler service stack
The spooler service is an engine—a collection of libraries—that controls each and
every print job on a machine. It’s best described as a stack starting with a router
service that can receive jobs handed off from client processes (see Figure 23-1).
Once into the stack, the job is passed down to the print processor for rendering
and then finally passed down to the Print Monitor for transmission to the I/O ports
on the physical interfaces at either local or remote ports.
The spooler is also the service that controls client and server printer management,
installation and administration of logical printers, and more. From the user’s point
of view, and for all intents and purposes, it’s the functionality that exists behind the
icons to which users send their print jobs. Each Windows 2000 machine has one
spooler service.
The spooler lives under the control of the service control manager. It can be stopped
and started at any time. You need only shut down the spooler service (using the
net
stop spooler
command) to stop all printing services on a machine. The spooler is
part of the Win32 subsystem and is never deleted or relocated. It’s owned by the
local system account, and a number of child processes and services depend on it.
The spooler service is also responsible for client-side printer management. In fact,
when you stop the service, the machine can’t request or send print jobs to the logi-
cal shared printers on a server machine. In other words, the spooler service acts as
both a client or server service as needed.
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 833
834
Part VI ✦ File, Print, and Web Services
The spooler service creates the files (spool jobs or files) in the directory where
it resides. The service and files are installed by default in the \winnt\system32\
spool\printers folder. So if your server hosts a large number of print jobs, you
should consider redirecting the print jobs to a volume dedicated to servicing
printers. Changing the path value in the printer’s Registry key does this. The key
in question is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers
And the value is a drive letter and subfolder path, not the UNC path. Once the value
has changed, you need to stop and restart the print service. You can also set up
separate folders for each printer’s job, and this is discussed next.
The spooler output files
These are the files that are generated by the spooler service (specifically the print
provider component) for each job it handles. Once the job has been sent to the
printer successfully, the spooler files are deleted. The spooler output files consist
of two types of files: the spool file and the shadow file. They serve the following
purpose:
✦ Spool file: This file has the
.spl extension and is the print job—what gets
sent to the printer.
✦ Shadow file: This file has the
.shd extension. It contains the information
needed for the print job, and is useful only to the print service components.
It contains information related to the job’s position in the queue, the owner
of the job, the destination printer, and so on.
To redirect the spool files for each printer to a separate volume or folder, change
the target printer’s default spool directory key. The key in question is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers
Drill down to the printer in question and then look for the SpoolDirectory data item.
You can then change the value (the default is blank). Remember that the value must
be a drive letter and folder, not UNC. This is demonstrated in Figure 23-2. One rea-
son for redirecting these spool files to custom directories is explained next.
Print queues
Windows print queues are the aforementioned print files (the collection of .spl
files) waiting in the spool folder to be printed. Each spooled job prints in the order
it was received. You can use the
net print command at the command line to man-
age a job (see Appendix A), or you can work with the document interactively via
the respective printer’s management interface (accessing the printer management
interface for both local and remote computers is discussed later in this chapter).
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 834
835
Chapter 23 ✦ Print Services
Figure 23-2: Changing the spool directory for a printer
If you manage a lot of printers, redirecting each printer’s spool files to a separate
folder can make it easier to manage the printer queue from the command line. It
may happen that a print job hangs for some reason, and one of the first places to
begin your diagnostics is in the print queue. If the queue receives the file from the
user, you can be sure that part of the process, the client spooler service, is not the
problem. Your next job would be to figure out why the job is sitting in the queue
going nowhere.
The print processor
The print processor is the winprint.dll file that resides in the \system32\
spool\prtprocs\w3286
folder. The job of this library of functions is to take the
print job data sent by the spooler and render it into data the printer can under-
stand (or not render, if it already is in a format the printer can understand). Most
print jobs won’t require any intervention by the print processor, unless you have
peculiar output requirements.
The default data type spooled to printers by the processor is NT EMF, which can
be handled by most printers. EMF stands for Enhanced Metafile Format, and most
printers can read it. You won’t have to intervene and change the print processor
libraries very often because, firstly, the client applications decide the data type to
be sent to the processor and, secondly, you can’t choose or force a job to be han-
dled by any particular print processor. This work is handled automatically.
Windows 2000 comes with built-in print processors. The one installed by default is
known as Winprint, and it handles the standard data types printed by Windows appli-
cations. Another important print processor is SFMPSPRT, which is the Macintosh
print processor, which handles jobs sent to PostScript printers. The Macintosh print
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 835
836
Part VI ✦ File, Print, and Web Services
processor is installed when you install Macintosh services on the host machine.
Winprint can handle the following data types.
✦ NT EMF ver 1.00x. EMF stands for Enhanced Metafile Format. These files can
be printed to most printers.
✦ RAW. Any job that comes out as this data type indicates to the print proces-
sor that nothing further need be done to print the document.
✦ RAW (FF appended). This type forces the print processor to check if a form
feed has been added to the end of the job—to ensure that the last page exits
the printer.
✦ RAW (FF auto). This type does not issue a form feed, and the print processor
adds it to the end of the job automatically.
✦ TEXT. This data type is usually issued for printers that do not accept direct
text. The print processor will render the text to meet the needs of the target
printer.
The Macintosh print processor, SFMPSPRT, renders jobs to non-postscript printers
for the benefit of Mac clients. However, the output is limited to the very basic
“playout” (to use a Mac-DTP phrase for sending a job to the printer). The default
data type is PSCRIPT1, which is a Windows bitmap format that will print to the
non-postscript printers. The best you can do for Mac clients is to install PostScript
printers (or face the wrath of the Mac maniacs), which will provide the high reso-
lution and graphics capabilities DTP publishers will require, regardless if the client
is Mac or Windows or Linux.
Ports
The term port is loosely used to refer to the hardware connections that allow a data
stream to flow from one device or media to another. Print servers and printer inter-
face equipment use ports to represent network and cable connections. Ports are
assigned network addresses and sit between the printer and the spooler service.
We will deal with server ports later in the chapter.
Print monitors
Print monitors are important components to understand. They are soft devices that
control the transmission process of the print jobs to the I/O ports on the devices
that interface with the physical printer. Windows 2000 supports several standard
print monitors. Print monitors perform the following tasks in the print service:
✦ They open up a connection between the print processor and the port. The
connection is then used to transfer the data to the I/O ports of the physical
printer or remote printer interface. In essence, they touch the actual ports at
the interfaces on the remote print servers or printer interface devices.
✦ They monitor the print job for error messages, progress, and completion.
Note
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 836
837
Chapter 23 ✦ Print Services
The print monitor essentially monitors the entire print job and reports status back
to the spooler. If a print job times out, for whatever reason, the monitor notifies the
spooler, and the spooler sends a message to the client.
Several print monitors are built into Windows 2000. You can see the list when
attempting to create a new port for the job data connection. Unfortunately, Windows
2000, like its predecessor, tends to create confusion between the monitor type and
the actual I/O port, as illustrated in Figure 23-3.
Figure 23-3: The Ports tab on
the Properties dialog box
Why is it so important to understand the role of the monitor? It’s usually the first
component in the print service stack that alerts you to a frequent reason for print
problems—inability to communicate with the local or remote port. If the print
monitor reports a problem connecting to a remote port, then you have a network
problem (IP, IPX/SPX, or lower on the network stack). Usually, a trip to the printer
will find the network cable kicked out of the network drop or the interface unit.
The following monitors come bundled with Windows 2000.
Local print monitor
The local print monitor (localmon.dll) manages the following ports:
✦ Parallel Interface: This interface caters to print jobs that are sent to the par-
allel port on the computer initiating the job. Every machine supports parallel
port printing. You choose this monitor when you set up a local printer con-
nected directly to the host. The local printer can also be shared, which makes
it a network printer.
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 837
838
Part VI ✦ File, Print, and Web Services
✦ Serial Interface: This interface provides the same service as the parallel inter-
face. The data, however, is transmitted through the serial interface, a commu-
nications port (such as COM1 or COM2), instead of the parallel interface.
Serial interfacing is not common on printers.
✦ File: This interface allows you to spool the job to a file name. The job is identi-
cal to jobs that are spooled directly to print interfaces, local or network. The
option of wrapping up the data into a file allows you to relocate the file to
another system for printing. In other words, the physical printer does not
have to be present or locatable on your network to be of service.
This option is convenient if you do not actually own or have access to the tar-
get physical printer. If you need to print to very expensive printers, such as
the Linotronic typesetters and heavy-duty PostScript printers run by service
bureaus and printing companies, you can print the job to a file and then send
the file to the service via the Internet or on a disk. All you need to do is install
the driver for the target printer. (By the way, PostScript print files are binary.)
LPR print monitor (TCP/IP printing)
As soon as you put some distance between the physical printers and the computers
from which you are requesting the print service, you establish a network-printing
environment. The protocol suite of choice for a heterogeneous computing/printing
environment is TCP/IP, and you would be well advised to aim for a homogenous
TCP/IP printer network. In particular, the LPR and LPD (Line Printer Daemon) ser-
vice is used as a standard for TCP/IP printing. It was derived from the Berkley UNIX
standards.
Windows 2000 supports LPR/LPD printing with the services of the LPR/LPD envi-
ronment (
lpd.exe) and the LPR print monitor (lprmon.dll). The LPR monitor is
installed by default when you install Windows 2000. If you install Services for UNIX,
additional TCP/IP printing support is added to the printing system to support print-
ers connected to Unix servers.
The LPR port can be used for all TCP/IP printing environments, especially for con-
necting to remote printer interface devices that do not support a custom TCP/IP
daemon or service. You can also use the LPR service to connect to printers hanging
off the local ports of UNIX computers and big iron, like VAX, MVS, and AS/400.
The LPR/LPD facilities are provided by the TCP/IP Print Server service, which is
installed when you install Windows 2000. Typing LPR at the Command Prompt will
return several Command Line commands for LPR printing.
Standard TCP/IP print monitor
Windows 2000 also installs a standard TCP/IP print monitor that will let you create
a port to any network interface device or printer that supports IP.
4667-8 ch23.f.qc 5/15/00 2:18 PM Page 838
[...]... publishing printers Locating Printers Printers can easily be located by browsing the printer servers, as is the case with legacy Windows NT printer servers The printer can then be installed on a client machine for printing — using the Add Printer Wizard or via the net use command Locating the printer in Active Directory You can also publish printers in Active Directory Figure 23-10 illustrates printers... dual-language HP Printer to PCL mode printing PSCRIPT.SEP Switches a dual-language HP Printer to PostScript mode printing SYSPRINT.SEP Used for PostScript printers SYSPRTJ.SEP Same as SYSPRINT.SEP but uses Japanese characters The pages described in the Table 23-1 are not actually printed They are script files that contain codes to instruct the print provider to print a separator page, and what to print on... 839 Chapter 23 ✦ PrintServices Third-party print monitors Third-party monitors may need to be loaded when you install printers that require custom or proprietary print monitors All printer manufacturers create print monitors that can be installed into the printer service at any time, post-installation of Windows 2000 These include the following legacy print monitors: ✦ Digital’s Print Monitor: Note... PM Page 853 Chapter 23 ✦ PrintServices Printer Pools Pooling is another means of publishing printers Several printers can be grouped together to form a contiguous print resource Note the checkbox on the Port tab that is checked, as illustrated in Figure 23-13 Figure 23-13: Pooling logical printers Printer pooling is ideal for a shop that is printing a high volume of documents Print jobs do not have... of printers First, we can control how and what printers print, and when they can print it This is printer-centric management Second, we can control which jobs print; we can delete them, pause them, redirect them, and cancel them This is job-centric management Finally, we can publish printer shares and control who has access to the printer, when they have that access, and what they can print This is printer... install Services for Macintosh and the AppleTalk protocol AppleTalk is all you need to print to Apple printers and other PostScript printers And you get the full features of the PostScript printer environments, including high resolution, color, separations, and more Printer Services: The Physical Environment To use Windows 2000 printer services, you need a computer that can act as a host for the services. .. summarizes the printer permissions 863 4667-8 ch23.f.qc 864 5/15/00 2:19 PM Page 864 Part VI ✦ File, Print, and Web Services Table 23-2 Printer Permission Types Access Print Manage Documents Manage Printers Print Yes Yes Yes Manage own job Yes Yes Yes Manage other’s job No Yes Yes Connect Yes Yes Yes Control Print Jobs No Yes Yes Delete all Jobs No No Yes Share Printers No No Yes Configure Printers No... whenever a client connects to a printer (an old or new logical printer) the latest driver will be available This keeps printing delays to a minimum and the volume of support calls down Installing and Setting up Printers When you install printers on a server, they will usually be installed as local printers printing to remote TCP/IP ports Local printers, by definition, are printers that coexist with a... logical printer environment and then move users to the new environment in phases The following guidelines for setting up a strategic print service plan are a start Printer Taxonomy Recall earlier that the printers that users print to are not the actual printer devices, but logical printers set up in Windows 2000, and these printers can thus go by several aliases You will learn later that one physical print. .. can only print to a printer that does not specifically deny him access Controlling access to printers is discussed later in this chapter 843 4667-8 ch23.f.qc 844 5/15/00 2:18 PM Page 844 Part VI ✦ File, Print, and Web Services Create a Print Network Creating a print network, used exclusively for printers, is a worthwhile exercise It helps keep other devices and machines from invading the printer’s . the
target printers.
Note
Router
Spooler
Non-Windows print clients
Host Windows
2000 Print Server
Remote Print Provider
Win 32 Printing
Local Print Provider
Print. 831
832
Part VI ✦ File, Print, and Web Services
Figure 23-1: The Windows 2000 Print Service represented as
a stack of services
Print routers
Print routers sit