by
Gabe Knuth
I hate printing. Sadly, it's one of those necessary evils like backups, patch Tuesday, and renewing your driver's license (where I've actually helped fix a printer...sigh).
That said, among the many changes in XenApp 5, Citrix has added some printing enhancements. In addition to the normal, EMF-based Universal Printer Driver (UPD) and the ubiquitous PCL drivers that we've come to know over the different names and versions, Citrix has included a new feature named the Citrix Universal XPS Printer Driver.
XPS, or XML Paper Specification, printing is a new feature of Windows Server 2008 that attempts to create a platform-agnostic electronic document format similar to PDF files. XPS printing capabilities are already built in to Windows Server 2008, Windows Vista, and Office 2007. XPS printing is also available on Windows Server 2003 and Windows XP with the installation of .Net Framework 3.0 or 3.5. Installing either of those versions of the .Net Framework will install the Microsoft component of XPS printing called "Microsoft XPS Document Writer."

NOTE: This next step is only if you're running Windows Server 2003. If you're running Windows Server 2008, you can skip to the next section - Configuring XPS Printing.
After that, you'll need to install the Citrix XPS Universal Printer component on to your application servers. To do this, run the Add Printer Drier wizard and install the drivers located on the XenApp installation CD. For Windows 2003 x86 servers, the location is \XenApp Server\w2k8\Program Files\Citrix\Drivers. For Windows 2003 x64 servers, the location is \XenApp Server\w2k8x64\Program Files\Citrix\Drivers. You'll be asked what type of printer you would like to install, and in this case it should be the Citrix XPS Universal Printer.
If successful, you should see the Citrix XPS Universal Printer driver in the print server properties (In the Printers folder, go to File | Server Properties).

Configuring XPS Printing
To configure your farm to use XPS printing, you'll need to create a printing policy that will dictate what kind of drivers the users' sessions will use. This step hasn't changed in many years - you simply select whether or not the session should use only the universal driver, the universal driver only if a native driver is unavailable, or only the native driver.
One thing to keep in mind, however, is that the default setting for XenApp servers is to use the EMF-based universal printer introduced with Presentation Server 4.0. To configure your servers to attempt to use the XPS driver first, you'll need to edit the registry.
- Open RegEdit and browse to the HKLM\Software\Citrix\UniversalPrintDrivers key.
- On the right side, you'll see the Driver List registry value. Right-click that value and select Modify.
- Note that the default string is a list of abbreviations that looks like "EMF;XPS;PCL5c;PCL4;PS", and that XPS is the second in the list. To configure your server to try XPS first, simply move XPS; to the front of the list, so that it looks like this: XPS;EMF;PCL5c;PCL4;PS.
- Once you've made the change, restart the Citrix Print Manager service.
What you've done is modified the priority of the universal printer drivers on the server. Each time a new session starts, the server will check to see if the client has A) a policy enforcing a universal print driver, and B) capabilities to support each of the methods in the registry key, in order. If a client does not have the ability to support XPS printing, then negotiations will move on to EMF printing, and down through the line until something compatible is found.
How does it work?
An XPS print job follows this process:
- A user tells an application to print, and the application sends the print data to the printer object within the user's session.
- The printer object on the server then sends the print data over to the XPS printer driver on the server, where it's converted into an XPS file (it's actually named *.xps).
- From there, the file is sent to the client device via the printing virtual channel to something called the XPS Print Helper, which is installed with the XenApp Plugin for Hosted Applications.
- At that point, if the XPS printer is not attached to a certain printer, the user is prompted to select a printer. If the XPS printer is attached to a certain printer (something that happens at the beginning of a session), the printer selection screen does not appear and the job is sent directly to the printer.
Wrap-up
Another day, another new feature. Thing is - this is more of an extension of a feature that Microsoft has added, but I'm glad that Citrix is taking advantage of it so soon. If you're using it and care to share your comments, please leave them below.
(Note: You must be logged in to post a comment.)