Printing architecture is one of the important Windows components. It contains spoolers and printer drivers. Service which is responsible to run spooler is "Spooler" and it's display name is "Print Spooler"
Windows application could be any application that sends the print job. It creates a print job by calling the GDI function or directly into winspool.drv.
It provides Win32 GDI functions that let applications communicate with graphics devices. It enables applications to use graphics and formatted text on both the video display and the printer or in monitor.
There are two modes in GDI. User mode and kernel mode
User mode have limited access on system resources. It has mostly software level resource to access.
Kernel mode have core level access on system resources. It can provide graphic device on demand so printer can process printing tasks on print spooler.
Before proceeding further into the process we have to understand what is print spooler and print driver
Print spooler is a small software that manages print jobs sent from the computer to the printer or print server. It manages the order of the documents to proceed to the print queue. Print spooler depends on HTTP and RPC service.
Location in C deive: C:\\Windows\System3spoolsv.exe
Registry: HKEY\LOCAL_MACHINE\System\CurrentControlSet\Services\Spooler
Print driver is a software that allows an application to communicate with printing devices.
C:\Windows\System32\drivers or C:\Windows\System32\DriverStore\FileRepository
Print driver has 3 files:
There are 3 driver support engines:
It is also known as Print Class Drivers and Model Specific Drivers. New v4 printer drivers introduced new sharing method known as enhanced Point and Print, eliminating the need to install cross platform drivers
Class drivers: v4 Class Drivers support common features to a broad set of devices that use the same printer. V4 drivers comes "In-Box driver" are called class drivers. It supports mostly used language like XPS, PS and PCL.
The problem with the V4 class drivers is that it supports limited features like Color, format, simple/duplex etc.. It doesn't support multifunctional device feature. Class drivers can be download and update from Windows update.
Model Specific Drivers: These are the V4 drivers created by Vendors to support other multifunctional device features which si not supported in class V4 drivers. You can download these drivers from vendor websites or from windows update.
The v3 driver model relies heavily on OEMs so that they can successfully run the specific feature from windows application. Administrator has to manage large number of drivers on server and client side. Sometime on requirement has to manage both 32-bit and 64-bit print drivers to support both of these client and server architectures.
In Windows Vista the size of the v3 driver was 1 GB which was huge in size even compared to Windows Vista time period. In Windows 7 MS reduces the file size up to 60* around 538MB. Many printer supports common file format PDLs like PCL, PS and XPS.
In Windows 8 MS focus on providing print class drivers insted of model specific drivers. By introducing print class drivers unnecessary line of code gets eliminated and the size become small and improved the speed of drivers.
It is a client-side interface into the Spooler that provides RPC stubs (acts as a gateway) for accessing the server.
It is a spooler's API server. It automatically started once the system boot-up (2000 or later).
It’ll decide which print provider to call, based on a printer name or handle supplied with each function call. The router decides whether to call a local or remote printer.
IIt is responsible for directing print jobs to local (localspl.dll) or remote print devices (win32spl.dll). They are also responsible for print queue management operations, such as starting, stopping, and enumerating a server's print queues.
It convert the spooled data (EMF - RAW File) from a print job into a format that is understood by a print monitor.
It is responsible for directing a print data stream from the spooler to an appropriate port driver and configuring the port on the server side as well. Both language and port monitor are user-mode DLLs.
Language monitors are user-mode DLLs: They provide a full-duplex communications language used by the client and printer. In the case of bidirectional printers, this monitor allows you to monitor printer status and send notifications, such as paper trays empty.
It consists of user mode .dll files. It provides communication between the user-mode to and the kernel-mode that has full privileges to do core level hardware changes.
The local port monitor (Localspl.dll) controls parallel, serial, and USB I/O ports where a printer may be attached, and sends print jobs to local devices on any of these ports. It uses the CreateFile, WriteFile, ReadFile, and DeviceIOControl functions to communicate with kernel-mode port drivers.
These are the MS port monitor that work over TCP/IP protocol that helps to transfer print data. These are not the only protocols. There are other protocols that perfrom the same task. These are the only monitors that support MS cluster service (MSCS).
Check How to install Port monitor
Point and Print refers to the capability of allowing a user to create a connection to a remote printer without providing disks or other installation media. It'll download all necessary files and configuration information are automatically from the print server to the client.
\\host-name\shareed-printer\printer-nameEnhanced Point and Print is a updated shared printer mechanism. It allows client to print to v4 share without downloading the manufacturer-provided device driver from the print server.
Without any restriction a user can create a printer connection to any server using Point and Print, computers will not show any warning for driver update and creating a printer connection to any server using Point and Print can be accessable to any user.
We can add restriction on non-admin users from GPO. Point and Print Policy
Location of GPO: User Configration\Administrative Templates\Control Panel\Printers
Microsoft changed new point and print behaviour to migrate server security issue known as "PrintNightmare". In the new behaviour it requires administrator privillages to install or update printer drivers using point to print. Now if there is any driver update on the client computer it'll pop up the need to update or install the driver, which requires admin credentials.
Open the command and run the command HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v RestrictDriverInstallationToAdministrators /t REG_DWORD /d 1 /f
Make sure you are using updates released October 12, 2021 or later. Now go to GPO Computer Configuration > Administrative Templates > Printers. Set the Limits print driver installation to Administrators setting to "Enabled". This will set the registry value of RestrictDriverInstallationToAdministrators to 1.
If you set RestrictDriverInstallationToAdministrators as not defined or to 1. In that case you want to install printer then you have 3 methods to install it.
This method of installing a printer is particularly useful when deploying printer drivers to users who are not members of the local Administrators group and are running Windows client / server.
Here are the steps you need to follow so from the PMC you can automatically deploy Group Policy on printer connections to users or computers and install the appropriate printer drivers.
Printer driver isolation is a process where printer driver run seperate processes that are seperate from the process in which the print spooler runs. That means if the printer driver fails then it'll not impact or crach print spooler and maintain the stability. Printer spooler basically 3 components that are Print driver configuration modules, Print processors and Rendering modules.
In the old version of windows all printer driver ran in the same prcoess in spooler. And if the single driver component failed, it'll couse the entire print subsystem to fail.
This problem was fixed in Windows 7 and Windows Server 2008 R2. Here an Administrator can configure the printer driver isolation where a printer driver to run in an isolated process and prevent it from crashing print spooler process.
Service responsibe for printer isolation is DCOM server process launcher. PrintDriverIsolationHost.exe file process in taskbar consist of Print process and Print driver components.
There are 3 modes in printer isolation which are None, share and isolated.
| Driver-isolation mode | Meaning |
|---|---|
| None | Print Spooler and drivers share a process called spoolsv.exe. |
| Shared | All drivers run in a single process called printisolationhost.exe, which is separate from the Print Spooler. | Isolated | Each individual driver will run in its own printisolationhost.exe process |
Spool files are the files used by OS that communicate with printer and provide instruction that how to print a file or a document.
Local printer spool file location: %systemroot%\System32\Spool\Printers
Registry location: HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers\<printer name>
| Extensions | Discription |
|---|---|
| .SPL | This is an actual spool file containing the print job. |
| .SHD | It contains the number of designated printer. Job priority, name of the user who sents the job. |
Rendering means converting content that a user wants to print into data for the printer to read. There are two types of rendering: Client-Side Rendering and Server-Side Rendering
In the client side rendering Application will create a print job, then client printer driver will renders/translates the document to a printer-specific PDL format (PCL, PostScript, XPS) before handling the job to the server. After that RAW-EMF fiele send to sever for queuing and printing by the print spooler. As a result, It’ll take less processing load on the server and improve stability.
Client-side Rendering help in Driver mismatch problem. When windows application create a print job request and because the spool job and randering of EMF format data will be done on same computer. So it doesn't matter what driver client has or incompatible with server drievr.
It also Support for offline printing which means the print-user can access and spool print job even the server they are not conneted. Rendering will be done locally and when the print server will become active or connect to print user system then the print job which was on the end-user will be send to the print server.
Windows client sends the unrendered print data to the server spooler on the server, and the server requires more processing to render the content to a printer-specific format..
Print and Document Services role services in server 2008 enables you to to share printers on a network also help you to manage network printer management tasks. You can deploy and migrate the print connection using GPO. In Windows Server 2008 R2 it comes with new feature Distributed Scan Server. Now you can share print server and scan server as well.
Print management console allows you to install, view, and manage all of the printers related activities in your organization from any computer running Windows Server. You can access it from MMC snap-in tool.
It is a set of files used during a device installation. It includes .INF file that contains all of the information that device installation components which is used to install device drivers.
If the driver package files contain any unique file which are not listed in other print driver packages then we have use the PackageAware=TRUE keyword in the INF.
Second if the files ia a driver package are shared with other print driver packages then move that shared file to seperate code driver and use PackageAware and CoreDriverDependencies keywords to seperate it to core drivers. This is very important to avoid file version conflicts during various remote installation scenarios.
It is a set of files used during a device installation. It includes .INF file that contains all of the information that device installation components which is used to install device drivers.
Restricts package point and print to approved servers: This policy setting restricts package point and print connections to approved servers. If you enable this policy then user will only be able to use Package Point and Print on print servers approved by the network administrator. Second thing is that the client system will check all the driver signature downloaded from the print server.
Only Use Package Point and Print: It restrict the clients computers to use package point and print only. Driver signature also check here.
Follow Us: