WS2008: Terminal Services Printing
Published Mar 15 2019 06:19 PM 2,025 Views
Microsoft
First published on TECHNET on Feb 17, 2008


Day Seventeen and we're still going strong.  Only ten days left until launch day!  Continuing on with Terminal Services, today's topic is Terminal Services printing in Windows Server 2008 - and more specifically Terminal Services Easy Print.

The big enhancement to Windows Server 2008 Terminal Services printing is the new Terminal Services Easy Print feature.  There are also some new Group Policy settings as well as some other features to enhance the TS printing experience.  So what is Terminal Services Easy Print?  Basically, this feature enables users to print from a Terminal Services session to the local or network printers that are configured on the client computer without the need to install drivers on the Terminal Server.  The Easy Print feature uses the drivers installed locally on the client system which results in a more consistent printing experience between local and remote sessions.  When a user prints from their Terminal Server session to a local printer, they will see the full printer properties dialog box from the local client and they will have access to all printer functionality.  The Easy Print universal driver acts as a proxy and redirects all UI calls to the driver on the client.  Administrators can also use Group Policy to limit the number of printers redirected to just the default printer which reduces the overhead and the number of printers that must be managed.  To use the Terminal Services Easy Print feature on Windows 2008 Terminal Servers, the clients must be running the Remote Desktop Connection (RDC) 6.1 client and have the .NET Framework 3.0 Service Pack 1 installed.  Both of these components are included with Windows Server 2008, and will be available for download for Windows Vista and down-level client operating systems.

The Terminal Services Easy Print feature is implemented in tsprint.dll and works seamlessly in mixed platform environments such as the following:

  • x86 clients connecting to x64 Windows Server 2008 Terminal Servers
  • x64 clients connecting to x86 Windows Server 2008 Terminal Servers

The document to be printed is rendered as an XPS document on the Terminal Server and then transferred back to the client where it is printed using the local print driver.  Since XPS documents can be created and printed on both x86 and x64 platforms and are platform-independent, there are no cross-platform compatibility issues when using Easy Print.  The Easy Print process is outlined below:

  1. User prints a document from an application while in their TS session
  2. The common print dialog is displayed and the user selects a redirected printer
  3. User makes any desired changes to the Preferences or Properties before issuing the print job
  4. TS Easy Print driver is loaded for the printer and intercepts the call
  5. TS Easy Print driver redirects the call to the RDC client using a virtual channel which in turn calls the actual printer driver on the client to invoke the Document Properties dialog from the driver on the client
  6. User makes the necessary changes to the document properties and clicks OK
  7. RDC client transmits the user-selected options changes from the local printer driver to the Terminal Server Easy Print Driver on the server
  8. The application reformats the document per the user-selected options and issues the print job
  9. The Terminal Server Easy Print driver processes the job and passes it through the GDI-to-XPS conversion routine
  10. GDI-based print jobs are routed through the GDI-to-XPS routines to convert the job to XPS format.  WPF-based print jobs do not pass through the GDI-to-XPS routines
  11. The server side spooler generates an XPS spool file and sends it to the client using a static virtual channel
  12. The RDC client receives the XPS spool file
  13. RDC client queries the printer driver to see if it supports XPS.  Is so, the XPS spool file uses the XPS print path on the client.  If the print driver does not specifically support XPS, the XPS spool file is handed off to the WPF print support infrastructure for conversion to GDI using the XPS-to-GDI conversion routines
  14. Print job is sent to the Print Spooler to be printed

The process is also shown below:

Because the RDC client, MSTSC.EXE, is a native Win32 application, and the WPF printing infrastructure uses managed (.Net Framework) API's, a managed wrapper was created to support Terminal Services Easy Print.  When a document is printed from a remote desktop session using the Easy Print driver on the Terminal Server, the RDC client calls the managed wrapper, TSWPFWRP.EXE, to assist with processing the print job on the client.  TSWPFWRP.EXE is only used for Easy Print redirected printer functionality and is only invoked when printing.

An important note - for any client computers that do not support the Terminal Services Easy Print feature, only client printers that have a corresponding driver on the Windows Server 2008 Terminal Server can be redirected in a Terminal Server session.

That wraps up today's post.  Tomorrow we'll have an overview of the RDP Client.  Until next time ...

Additional Resources:

- CC Hameed

Share this post :
Version history
Last update:
‎Mar 15 2019 06:19 PM
Updated by: