A Dummies Guide to Tackle Printing Issues in a Citrix Environment

Printing in a Citrix environment can be difficult and can cause numerous stability issues if it is not done properly. Printer drivers run at the kernel level of the Windows operating system and there are some really badly written drivers out there especially around the cheaper units whereby a lot of the printer functions are software driven within the device driver. There is one sure way to p**s off your user base and that is to take away their ability to print. In this session we will be taking a high level over of the options of printing within Citrix and providing some guidelines from 18 years plus hands experience.

What is the issue?

Why printing is still an issue with Citrix solutions today is almost a laughable. I remember sitting in an audience at Citrix iForum back in 2004 where Citrix were discussing Universal Printer drivers in Presentation Server 4.0 proclaiming to have forever solved “printing issues” in Citrix. In the US this went down a storm with raptures of applause but in the UK they were met with stoney silence. The reason being because it is no joke. Printing has been and will continue to be a problem for Citrix if it is not thought through properly.

The problem actually is not Citrix related, they in fact have created some tools to make life easier. The problem is a Microsoft issue, they like to design back end systems on legacy IT solutions stemming from day that Bill Gates said one day everyone will have their own PC. Well those days (thankfully) have long gone, certainly within the corporate world where there is no such a thing as a Personal Computer anymore, it all about user customisation which is stored in the user profile. In the PC world you have a desktop with applications installed and maybe a roaming profile. But fundamentally you used to use only one system at a time and you connected to a print server and used only a handful of printers. The device drivers where pushed out from the Print Server and the IT dept. didn’t need to think too hard about things. Then suddenly Microsoft release Server Based Computing (SBC) with Microsoft Terminal Services and now things start to get difficult because [one], we are now dealing with a different operating system from the PC which requires a different driver, [two] because we are dealing with a system that at some point in its life will have to cater for everyone in the business that is ever going to use SBC  system so now every printer device driver that you ever likely to need will have be installed on every Terminal Services server. Given that I have said before that badly written drivers will cause stability issues, this is exactly what we see today. I have personally witnessed customers with hundreds of drivers on their Citrix servers and then they wonder why the print spooler keeps crashing. All it take is for one rouge driver to cause printing hell.

So what have Citrix done to improve things?

Auto Printer Creation

Citrix has the ability to map local printers using a policy which they call Auto Printer Creation and they have built their own universal print driver that works on (most) printers for basic printing functions.

Using Auto Printer Creation in Citrix sounds like the perfect way to manage Printing; Printers that are installed locally on the device you come in from will be available when you are using Citrix the traffic is compressed up to a 10:1 ratio and rendering and spooling is done on the client end, Sounds perfect doesn’t it? But it isn’t… First off, using Auto Creation only really works if you use the inbuilt Citrix universal Printer Driver (UPD) otherwise you will have to install drivers for every make and model of printers in to your Citrix master image which is unrealistic. Using a universal driver will only give basic functions so MFP functions will be lost. Secondly it assumes you’re coming in from a Window machine with locally installed printers so rule out Auto Creation for environments with dumb terminals or if there is BYOD initiative is in place.

Golden Rules when using Auto Printer Creation

  1. Only ever use Auto Printer Creation with the Citrix UPD otherwise it will try install the device driver for every printer is uses otherwise it will fail. Set the policy to use UPD only.
  2. Only map through the clients default printer as some users end up with lots of dead printers on their system especially if they move around and Citrix will try enumerate all of them at log on which can really slow down the logon process
  3. Prevent any mapping of any form of image writing printers including PDF printers and Microsoft Office Image writers etc. One sure way to crash your print spooler is to try and print to an Auto Created PDF Printer that is installed in the client’s local machine which is then mapped using Citrix UPD. It doesn’t like it
  4. Auto Printer Creation should not be relied upon for the majority of the user as I classify it as a best endeavor solution because from experience if the Citrix servers are under load printer mapping will fail, also UPD is limiting for users of MFP printers and if your following the advice above they can only have one printer at a time.
  5. Auto Printer Creation has its place but I would only recommend it for small offices especially if there is no direct connection to the print server from Citrix servers or for home\remote users.

Session Based Printing

Session based printing is by far the most common solution I still see today for managing printer in Citrix. Session Based printing is simply where you create a policy for every printer that you are likely to connect to which then points to a Print Server[s]. These policies are typically applied to only certain AD groups and if the user is in that group they will get that printer. This can actually work quite well in controlled environments but the administrators have to be very careful in only adding printers that have been validated on the Citrix HCL and they have been fully tested on a UAT\DEV box to ensure the drivers don’t crash your Citrix Servers.

Golden Rules when Using Session Based Printers:

  1. Try Match like for like the Print Server operating system to the Citrix Session servers. (i.e. for XenApp 7.6 environments on Windows Server 2012 R2, make sure the print server is the same) that way you can ensure the driver on the print server will install correctly on the Citrix servers
  2. Install the Print Servers in the Same Data Centre as the Citrix Servers otherwise printer enumeration will slow down
  3. Try to install as few different makes and model of printers as possible to reduce the overall number of drivers.
  4. If the printer manufactures supply a universal driver for their printers use it. HP for example provide a universal driver that works on most HP printers. This will again reduce the number of drivers needed.
  5. Use PCL 6 driver where you can or fall back to PostScript. PostScript can be less efficient but I have found it to be overall reliable

Citrix Universal Print Server

Since the release of 7.6 of XenDesktop, Citrix have introduced something called Universal Print Server (UPS) which is simply an agent that you install on your Printer Server and then in conjunction Session Based Printing allows the use of Citrix Universal Print Driver (UPD). This really is about the best we ask for right now, as it gives us the ability to utilise UPD for most users along with a print server and gives us control with Session Based Printing. But it is not perfect, I was disappointed see it does not support Microsoft clustering, so if you are relying on MS clustering for printing resilience UPS will not work for you.

Golden Rules when Using Universal Print Server:

  1. Ensure your Print Server is resilient using hypervisor tools like DRS and have a solid backup plan that allows for rapid recovery to get around the clustering limitation
  2. Use in conjunction with Session Based Policies and only use native drivers as an exception always try to use UPD only
  3. Make sure that the Citrix Printing policies are monitored and they are set to auto recover
  4. Try it, Citrix UPS could save you a lot of money negating the need for products like UniPrint and ThinPrint.

 

When not to use Citrix Printing Tools?

There are certain situations when a third party print management solution is highly recommended. Here are a few:

Follow Me Printing

I am seeing a much larger trend today with customers considering or have embraced a Follow Me Printing solution. From a Citrix perspective these are great. We can forget about all of the complexities above and you install two printers on your Citrix Servers Colour Printer and Mono Printer and these are installed as local printers that everyone see, so no mapping no policies, nothing. Everyone see just these two printers. The user prints, they select colour or mono they then walk up to any printer connected to the solution and put in their code or scan their ID badge and it prints to that particular printer. The two systems that I have validated on Citrix are SafeCom and UniPrint. If follow me printing is a requirement for you than I would suggest you look at buying a solution even though you can do a limited version of a follow me print solution based on IP subnets it is clunky and requires you to have a separate subnets for each area of breakdown and they are simply nowhere near sophisticated as a purchased solution.

Secure Printing

Again, if security is important to you than again I would recommend a solution like UniPrint whereby documents are only released when users authenticate their credentials on the printer by entering their passwords, or tapping onto the vPad user authentication device so no more documents end up in the wrong hands.

Quality Printing

If you are a design company for example and you have to colour match your print out to your screen colours and quality of print is essentials avoid any form of compression tools even if the print jobs are massive. In these instance try to keep the print server as close as possible to the printer to prevent overloading the WAN and use Citrix XenDesktop VDI for the users desktop and install the native drivers directly on to the VM’s for the users of this printing along with any colour matching tools.

Summary

  • Use Citrix Universal Print Server on 7.6 installations
  • Protect you Print Server using reliable backups and hypervisor tools
  • Create session policies that use UPD only for the majority of your users
  • For the printers that don’t work with UPD, use session based printing but test each driver thoroughly and use PCL v6 drivers or PostScript on the print servers
  • Use Auto Printer Creation for remote users through the access Gateway as a final catch all

I cannot guarantee you a trouble free printing environment but if you are having printing problems and you follow these rules I can guarantee you will improve things and you will thank me.

Brett Loveday

CCIA MCSE CCNP VCP