network printing

Upload: ashrith3187

Post on 10-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Network Printing

    1/13

    Network PrintingNetwork printing is the collection of software components in the Microsoft Windows

    Server 2003 operating systems that provide network printing services for clientcomputers.

    Network Printing enables users in locations geographically separate from each other and

    from their print devices to produce documents for themselves and others. Print serversenable multiple clients to share one or more print devices. By using the Active Directory

    directory service in the Windows 2000 Server and Windows Server 2003 operating

    systems, users can locate printers in a target location that supports the features necessaryto produce their documents.

    How Network Printing WorksUpdated: March 28, 2003

    Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, WindowsServer 2003 with SP2

    How Network Printing Works

    In this section

    Terms and Definitions

    Network Printing Architecture

    Network Printing Protocols

    Network Printing Processes and Interactions

    Network Ports used by Network Printing

    Related Information

    Network Printing enables users in locations geographically separate from each other and from their printdevices to produce documents for themselves and others. Print servers enable multiple clients to shareone or more print devices. By using the Active Directory directory service in the Windows 2000 Server andWindows Server 2003 operating systems, users can locate printers in a target location that supports thefeatures necessary to produce their documents.

    This section describes the components and processes of network printing with print servers runningWindows Server 2003.

    Terms and Definitions

    The following three terms are data types associated with Network Printing.

    RAW

    Data type used in a page description language that is ready to be sent to a print device; for example, PCLor PostScript. This is the default data type for print jobs on computers that are not running Windows XPProfessional or Windows 2000. These RAW files are device-dependent; that is, the spooled data isdestined and formatted for a particular device.

    EMF

    http://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_tjab%23w2k3tr_prntt_how_tjabhttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_tjab%23w2k3tr_prntt_how_tjabhttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_aifl%23w2k3tr_prntt_how_aiflhttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_txqg%23w2k3tr_prntt_how_txqghttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_owog%23w2k3tr_prntt_how_owoghttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_yxcr%23w2k3tr_prntt_how_yxcrhttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_fxbi%23w2k3tr_prntt_how_fxbihttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_tjab%23w2k3tr_prntt_how_tjabhttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_aifl%23w2k3tr_prntt_how_aiflhttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_txqg%23w2k3tr_prntt_how_txqghttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_owog%23w2k3tr_prntt_how_owoghttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_yxcr%23w2k3tr_prntt_how_yxcrhttp://technet.microsoft.com/en-us/library/cc783789(WS.10).aspx#w2k3tr_prntt_how_fxbi%23w2k3tr_prntt_how_fxbi
  • 8/8/2019 Network Printing

    2/13

    Data type used between print clients running Windows XP Professional and print servers runningWindows Server 2003. With an enhanced metafile (EMF), the Graphics Device Interface (GDI) releasesconsole control after generating the EMF. The EMF data is then interpreted in the background on a spoolerthread and sent to the printer driver. Splitting the rendering of a print job in this way is especially usefulfor very large documents because the application is not tied up for the entire rendering time.

    EMF spool files are encoded to provide greater printer independence. For example, a graphic measuring 2inches by 4 inches on a video graphics adapter (VGA) display and stored in an EMF maintains those

    dimensions whether it is printed on a 300-dpi laser printer or a 75-dpi dot-matrix printer. The EMF datatype also ensures that the print server uses the fonts you specified.

    TEXTData type used to send a simple-text print job to a printer (such as a PostScript device) that cannotinterpret simple text. The spooler creates a new print job, embedding the text in print instructions that are

    derived from the printers defaults for font, form, and orientation. Several character sets are in commonuse, and text files do not indicate which one to use. The TEXT data type uses the ANSI character set, so itmight print some characters incorrectly if the application uses a different set.

    Network Printing Architecture

    Network printing components include a server spooler on a print server running a product in theWindows Server 2003 family and a client spooler running on a client computer. Because print jobs usuallyoriginate on a client computer, this section first describes the architecture of the client spooler.

    Client SpoolerThe client spooler (Winspool.drv) is the component on Windows operating systems that delivers print jobsfrom applications on the client computer to print servers. On client computers running Windows XPProfessional or Windows 2000 operating systems, print jobs are delivered directly to the client spooler; on

    other Windows operating systems, a redirector is necessary to deliver print jobs to the client spooler, andon non-Windows operating systems, other mechanisms are required to complete a print job.

    The following figure shows the components involved in generating and sending print jobs to the printserver.

    Components of Client Computers That Generate and Send Print Jobs

  • 8/8/2019 Network Printing

    3/13

    Note

    The preceding figure is a simplification of network printing processes. Specific platforms use

    different components and processes. For information about printing processes specific to your

    environment, you might need to refer to documentation specific to your platform.

    Windows clients and non-Windows clients include the following operating systems:

    Windows ClientsClient computers running Windows 95, Windows 98, Windows Millennium Edition, Windows 2000,Windows XP, or Windows Server 2003.

    Non-Windows ClientsClient computers running UNIX, Apple Macintosh, or MS-DOS. This group also includes NetWare clients.

    The following table defines the client components that generate and send print jobs.

    Components of Client Computers That Generate and Send Print Jobs

    Component Description

  • 8/8/2019 Network Printing

    4/13

    Windows Application Any program that creates printable data.

    Non-WindowsApplication

    Any program that creates printable data.

    Client Spooler Processes and sends print jobs from the client to the print server.

    Graphics Device

    Interface (GDI)

    Provides services to the printer driver, including caching, client-server

    communications, and character conversion.

    Printer Driver Communicates with print devices to generate output from data supplied by theGDI.

    Line Printer Remote(LPR)

    Protocol that sends print jobs to a server running the server-side protocol, LinePrinter Daemon (LPD).

    AppleTalk Protocol used by Macintosh clients and Windows servers, when Services forMacintosh is installed on the servers.

    NetWare Protocol used by NetWare clients for file and print services and by Windowsservers when NWLink is installed on the server.

    Local Print Device Prints device-specific data. This device is attached to a local port on the server.

    Remote Print Device Prints device-specific data. This device is directly connected to the network andmanaged by this print server.

    Remote Print Server Accepts print jobs for print devices it manages.

    Server SpoolerWindows Server 2003 accepts and delivers print jobs using a variety of protocols to serve a diversity ofclient computers and print devices. The server spooler is the primary component of network printingarchitecture on Windows Server 2003. The server spooler and its components are consolidated into a

    single architecture, providing smooth background printing by using background thread processing.Because the thread processing for one print job must complete before the processing begins for the nextprint job, the spooler passes data to the printer only when the printer is ready to receive more data.

    The following figure illustrates the server spooler and how it processes a print job.

    Components of Windows Server 2003 Print Server

  • 8/8/2019 Network Printing

    5/13

    The following table defines the components of network printing on Windows Server 2003.

    Components of Network Printing on Windows Server 2003

    Component Description

    Print Spooler

    Service

    Manages the printing process, which includes retrieving the location of the correct

    printer driver, loading the driver, spooling high-level function calls into a print job,scheduling the print job for printing, and so on.

  • 8/8/2019 Network Printing

    6/13

  • 8/8/2019 Network Printing

    7/13

  • 8/8/2019 Network Printing

    8/13

    Spooler service manages the printing process, which includes such tasks as retrieving the location of thecorrect printer driver, loading that driver, spooling high-level function calls into a print job, and schedulingthe print job for printing. When the tasks for a particular print job are complete, the Spooler servicepasses the job to the router.

    The spooler router, Spoolss.dll, determines which print provider to call, based on a printer name or otherinformation provided with the print job. If the print job is for a printer served by the local server, theprovider is the local print provider, Localspl.dll; if the print job is for a printer served by a remote server,

    the job is routed to a remote print provider.

    The print provider is the software that supports the specified print device. The local print provider,Localspl.dll, actually calls the printer driver to render the print job. The print provider is also responsiblefor spooling the print job.

    After a print job is spooled, it is the Print Monitor that directs the output to the appropriate port monitor.Port monitors provide a communications path between the print spooler and the port drivers that accessthe port hardware. Port monitors serve both local print devices connected directly to the server andremote print devices connected directly to the network.

    In addition to the port monitor, when the target print device supports two-way communication, alanguage monitor provides a communication path for configuration and status information. The languagemonitor supports delivery of unsolicited information from the printer, for example, notice that it has run

    out of paper.

    Printing Components in DetailThe following sections cover in greater detail some of the components on the client and server involved innetwork printing.

    Remote Print ProviderWhen the server spooler receives a print job from the client spooler, the print router queries the remote

    print providers, and gives control of the print job to the first provider that recognizes the destinationprinter. Remote print providers can be created by other companies; Microsoft supplies the following threeremote print providers:

    Win32spl.dllWin32spl.dll is the remote print provider on a Windows-based network. Win32spl.dll sends jobs to print

    servers running Windows NT 4.0 or Windows for Workgroups. For a print server runningWindows Server 2003, Win32spl.dll makes an RPC to the spooler on the server (Spoolsv.exe), which

    makes a call to the print router (Spoolss.dll). The print router receives the job over the network andpasses it to the local print provider as if a local client had submitted it.

    Inetpp.dllInetpp.dll performs specific processing on Internet print servers. For an Internet print server, Inetpp.dllrecognizes the printer name by its URL and submits the print job to the appropriate printer by using IPP.

    Nwprovau.dllNwprovau.dll performs specific processing on NetWare print servers. For a NetWare print server,Nwprovau.dll recognizes the printer name when the print router on the print server runningWindows Server 2003 polls it. Nwprovau.dll takes control of the print job and sends a message to theNetWare Workstation Service, which in turn passes control to the NetWare redirector. The NetWare

    redirector sends the print job to the NetWare print server.

    Print Router

    When submitting a document for printing, the application communicates with the client side of the spooler(Winspool.drv). Winspool.drv makes an RPC connection to the server side of the spooler (Spoolsv.exe),which makes a direct API call to the print router (Spoolss.dll), which is also on the server side of thespooler. The print router passes the print job to the local print provider.

    Graphics Device Interface (GDI)The GDI calls the printer driver and provides information about the type of printer needed and the datatype used. The printer driver responds by sending printer data to the GDI, which the GDI passes to thespooler.

  • 8/8/2019 Network Printing

    9/13

    Computers running Windows 2000, Windows XP Professional, and any 32-bit version ofWindows Server 2003 can run 16-bit applications through a process called Windows on Windows (WOW).WOW allows 16-bit applications to run on an x86-based computer.

    WOW interacts with the applications through the GDI and with printer drivers through the device driverinterface (DDI). The GDI also provides services to the printer driver, including caching, client and servercommunications, and conversion from American National Standards Institute (ANSI) character set toUnicode.

    Note

    The 64-bit versions of Windows XP Professional and Windows Server 2003 do not support 16-bit

    applications. However, WOW 64 does allow 32-bit applications to run on 64-bit versions of

    Windows XP Professional and Windows Server 2003.

    Printer DriversA printer driver is a software program that understands how to communicate with printers and plotters(devices used to draw charts, diagrams, and other line-based graphics). Printer drivers translate theinformation that an application sends through the GDI into drawing commands that the printer

    understands. These drawing commands are for creating text and graphics. Various drivers must beinstalled on the print server to support different hardware and operating systems. For example, an

    administrator who uses a computer that is running Windows Server 2003 and who shares a printer withclients that are running Windows 95, Windows 98, and Windows Millennium Edition, might need to installthe appropriate drivers so that clients that are running these versions of Windows are not prompted toinstall the missing drivers.

    The printer driver sends information about the printer settings, including the specifications that areneeded to produce each character of the document, to the GDI. The printer driver also transmits helperservices or utilities required to make the output print correctly.

    Some kernel-mode printer drivers might cause the system to stop responding. Windows Server 2003 givesyou the ability to control the installation of printer drivers. By default, all editions of Windows Server 2003block the installation of kernel-mode drivers, but you can allow their installation by disabling the Group

    Policy setting Disallow installation of printers using Kernel Mode drivers. This setting affects onlythe installation of new kernel-mode drivers. If you are upgrading your system, existing kernel-modedrivers are unaffected.

    Windows Server 2003 provides the following three generic printer drivers:

    Universal (Unidriver)

    PostScript

    HP-GL/2 plotter

    Universal printer driver (Unidriver)The Unidriver is also called the raster driver because it supports raster (bitmap) graphics printing and iscompatible with many printers. This driver supports the following features:

    Color printing at various depths, such as 4 bits per pixel (bpp), 8 bpp, and 24 bpp.

    Scalable TrueType and OpenType fonts, device fonts (including double-byte), grayscale printing,

    font substitution, run length encoding (RLE), Tag Image File Format (TIFF) version 4.0, and Delta

    Row Compression (DRC).

  • 8/8/2019 Network Printing

    10/13

    An extension interface that allows printer manufacturers to customize the driver for specific

    models.

    Vector graphics languages HP-GL/2 and PCL-XL, monochrome, and color. This is a change from

    the version of Unidriver that shipped with Windows 2000. (The added HP-GL/2 support, which is

    used with normal PCL5e printers, is different from the HP-GL/2 for plotters, which is used only forplotters.)

    The Unidriver contains the following component files:

    Unidrv.dll is the printer graphics driver file for printer languages based on raster images,

    including most inkjet and dot-matrix printer languages.

    Unidrvui.dll is the configuration file. It displays the user interface for Unidrv.dll.

    Unires.dll, Stdnames.gpd, Ttfsub.gpd and some other support files.

    Raster minidriver, which has the file name extension .gpd, is the data file, and is also called the

    characterization file. The file name depends on the printer or printer family.

    PostScript printer driverThe Windows Server 2003 PostScript driver sets up the print jobs for printers that have an onboardPostScript interpreter. This driver automatically supports key features including binary transfercompression, resolution, and paper source for printers reporting as PostScript levels 1, 2, and 3. Itsoutput is fully compliant with Document Structuring Convention (DSC) 3.0, a structural specification for

    PostScript documents.

    This driver contains the following component files:

    Pscript5.dll is the driver file.

    Ps5ui.dll is the configuration file. It displays the user interface for the driver file, reports device

    capabilities to applications, and handles DevMode settings. Ps5ui.dll also allows you to enable

    TrueType and OpenType font substitution and image color matching and to determine whether

    color matching needs to be done on the host or on the printer.

    The data file, which has the file name extension .ppd, is also known as a characterization file. The

    file name preceding the .ppd extension varies and is typically determined by the printer

    manufacturer. PPD files are the only printer driver files that are generally binary-compatible

    across processors and platforms.

    HP-GL/2 plotter driverThe Windows Server 2003 plotter driver supports diverse plotters that use the HP-GL/2 language;however, Windows Server 2003 does not support HP-GL. The output from an HP-GL/2 driver requires aplotting device that can process all the enhancements built into the HP-GL/2 language.

    This driver contains the following component files:

    Plotter.dll is the driver file.

  • 8/8/2019 Network Printing

    11/13

    Plotui.dll is the configuration file. It displays the user interface for Plotter.dll.

    The driver contains a data file, which has the file name extension .pcd. The file name preceding

    the .pcd extension varies and is typically determined by the plotter manufacturer.

    Local Print ProviderThe local print provider, Localspl.dll, writes the job data to a spool (.spl) file. It also tracks administrativeinformation, such as user name, document name, and data type, in a shadow (.shd) file. Spooling protects

    a print job by saving it on disk. If a power failure or other disaster occurs before all jobs in the queue areprinted, the .spl and .shd files preserve the documents and prevent loss of data after processing resumes.

    Note

    If the print job is only partially saved to disk, the spooler might recognize the print job as corrupt

    and delete it upon restart.

    Next, Localspl.dll polls the print processors for recognition of the document data type. If no data type hasbeen set, Localspl.dll receives the job and uses the default data type.

    By default, .spl and .shd files are written to the folder systemroot\System32\Spool\Printers, and they aredeleted after the job prints. If the hard disk partition containing Windows Server 2003 does not have

    enough space for these files, you can change the location of the folder. You might also move the spoolfiles if you want to move the spooling load to a separate disk array.

    Note

    Do not attempt to spool to the root of a disk, such as D:\. This causes the files to spool to the old

    default spool folder.

    Print ProcessorThe print processor is a part of the spooler process. If the job type is EMF, the print processor works withGDI to move the spooled print jobs from the hard disk to the printer driver. If the data type is RAW, the

    print processor helps in moving the job directly to the printer. The print processor controls certain featuresof the print job, depending on the kind of job. For example, if the data type of the spooled job is EMF, the

    print processor can help in printing the document in reverse order or it can print it in booklet form insteadof the default one-page-per-sheet form. Winprint.dll is the name of the default print processor onWindows Server 2003. Winprint.dll is part of Localspl.dll.

    Software vendors can develop their own print processors for custom data types. A printer vendor can alsodevelop a custom print processor if the vendor has its own printer driver or supports a data type otherthan the three that WinPrint.dll supports. Also, a vendor can write a custom print processor if the vendorwants to add functionality that Winprint.dll does not provide. Usually, the print processor is installed when

    the printer driver is installed.

    Print MonitorsWindows Server 2003 supports two kinds of print monitors:

    Language monitors

    Port monitors

    Port monitors are further subdivided into:

    Local port monitors

  • 8/8/2019 Network Printing

    12/13

    Remote port monitors

    Language monitorThe language monitor provides the common language that is needed for the client and printer tounderstand each other in bidirectional communication so that you can configure the printer and monitorprinter status. You can request configuration and status from the printer, and the printer can sendunsolicited status information (such as Paper tray empty) to the client.

    Windows Server 2003 includes Pjlmon.dll, a language monitor that uses Printer Job Language (PJL). PJL isthe language that implements the bidirectional communication; it does this by using a parallel portconnection, such as one between a Hewlett-Packard LaserJet 5Si and the computer. Any bidirectionalprinter that uses PJL can use Pjlmon.dll.

    If a printer uses a different printer language, the vendor can develop a language monitor for it. A vendormight also develop a language monitor to add data, such as printer-specific control information, to theprint stream that is going to a unidirectional printer.

    To take advantage of bidirectional printing, you need a bidirectional printer, and a correctly configuredbidirectional port and port monitor. The standard port monitor supports bidirectional communication bydefault.

    Local port monitorThe local port monitor controls parallel and serial input/output (I/O) ports where a printer might beattached. The local port monitor sends print jobs to local devices, including those on familiar ports such as

    LPT1, COM1, or FILE (Print to File).

    A second local port monitor, Usbmon.dll, controls communication through universal serial bus (USB) ports.Usbmon.dll installs automatically whenever you plug a USB printer into the correct physical port on yourcomputer. If USB has been enabled in the BIOS, Windows XP Professional detects the device and displaysits settings on the screen.

    Installation opens the USB Root Hub and a generic USB printer port (for example, USB001, USB002), andcopies the printer Plug and Play driver.

    Remote port monitorsAll other port monitors that are supplied with Windows Server 2003 are remote monitors that enableprinting to remote printers. An example is the standard TCP/IP port monitor.

    Network Ports Used by Network Printing

    The following table lists services used in network printing and the protocols they provide in the networkprinting process. Not all services are installed or active at all times, and the protocols used in networkprinting depend on the type of clients submitting jobs to the print server.

    Port Assignments for Network Printing

    Service Name UDP TCP

    Services for Macintosh (usesAppleTalk)

    201, 202, 204, 206 201, 202, 204, 206

    Internet Printing Protocol (usesHTTP)

    80 80

    NWLink (uses IPX/SPX) 213 213

    LPDSVC (accepts LPR) 515 515

    LPR Port (sends LPR) 721-731, >1023 721-731, >1023

    Server (using SMB) 137, 138 139

  • 8/8/2019 Network Printing

    13/13

    Server (using RPC) 530 530

    Standard Port Monitor (usingSNMP)

    161, 162 161, 162

    Standard Port Monitor (usingLPR)

    > 1023 > 1023

    Standard Port Monitor (usingRAW)

    2000, 2501-2503, 3001, 6869,>=9100

    2000, 2501, 2503, 3001, 6869,>=9100

    Standard LPR, according to RFC 1179 from the Internet Engineering Task Force, uses ports 721 through731 to send data. However, Windows Server 2003 can be configured on a per-port or per-server basis touse port number higher than 1023 for sending data with LPR.

    Also different from RFC 1179 is the standard port monitor, which sends documents to a printer by usingeither the RAW or LPR printing protocol. Together, these protocols support most current TCP/IP printers.

    The RAW protocol is the default print protocol for most print devices. To send a job formatted with RAW,the print server opens a TCP stream to the printer's port 9100 or another port number and selects theconnections to multiport external devices. For example, on certain print devices port 9101 goes to the firstparallel port, 9102 goes to the second parallel port, and so on.

    The standard port monitor uses the LPR protocol when you specify LPR protocol during port installation orreconfiguration, or when the RAW protocol cannot be established.

    The standard port monitor deviates from the LPR standard in the following ways:

    The standard port monitor does not conform to the RFC 1179 requirement that the source TCP

    port must lie between port 721 and port 731. The standard port monitor uses ports from the

    general, unreserved pool of ports (1024 and above).

    The standard port monitor sends a print job to the spooler without determining the actual job

    size and designates a default job size, regardless of the actual size of the job. The LPR standard

    states that print jobs must include information about the size of the job the port monitor sends.

    Sending a print job that contains job size information requires that the port monitor spool the job

    twice once to determine size, and once to send the job to the spooler. Spooling the job once,

    by using the standard port monitor, improves printing performance.