Citrix Printing: Brush up on the basic best practices

Being around Citrix for a while, one of the things that you'll notice and continues to hold true is that printing is still one of the biggest challenges. With each release, Citrix touts that printing is better.

Being around Citrix for a while, one of the things that you’ll notice and continues to hold true is that printing is still one of the biggest challenges. With each release, Citrix touts that printing is better. However, reality sets in and you soon find out that you’re in the same boat again and you’re forced back to old school printing configurations.

Don’t be mistaken, the EMF printing model of Citrix Presentation Server 4 is a good move. It has given back your server’s horsepower from the days of when a single logon or print job would spike your processors, or even worse, clog the user’s virtual channel. Most of the problems occur when administrators expect that printing will work out-of-the-box and are unfamiliar with how to properly set it up. Further, many of the helpful printing sites seemed to have ventured off topic, adding additional content and making it difficult to find a clear, concise, guided approach in how to set up printing.

Once again, if you’ve been around Citrix for a while, you should know these best practices and how to set up printing, but a re-fresher never hurts. This guide is mainly written for the new Citrix administrator either setting up an environment or even trying to fix an existing one. Although you can debate some these recommendations, they have been successfully deployed in environments with 50,000 named users.
Before you start the journey of setting up Citrix printing, you need to know what makes up the system and how they work together.

Printing Components

Basically, there are six main areas or components that you need to be concerned about. These are:

  • Server Side Printers, which includes print drivers that are installed on the Citrix server.
  • Client Side Printers are printers that are both locally attached and network attached that are defined on each client workstation.
  • Management Console Settings are configurations that are made in the Presentation Server Java Console. These include Citrix policies and driver mappings.
  • Wtsprnt.inf is a text file that resides on each Citrix Presentation Server that contains the re-mapped printers for the farm.
  • Wtsuprn.inf is a legacy text file equivalent of the wtsprnt.inf file. This may still exist if the servers have been upgraded from previous Citrix releases. Unlike the wtsprnt.inf, this file can vary from server to server.
  • NTPrint.inf is a configuration file that has information about all drivers that shipped with the server operating system that can be loaded.

Printer Auto-Creation

Now that you’re a little more familiar with the components, it’s time to look at how they interact with each other. When a client first connects, Citrix initiates a sequence to auto create the necessary server side printers. For it to be successful, these printers need to correspond with the client side ones and the printer driver name on the client must match (exactly) a printer that is defined in either the registry or one of the .inf files. It parses these files, listed below (in order): 

  • wtsuprn.inf (if it exists)
  • wtsprnt.inf
  • The registry
  • ntprint.inf

If a match is found, it bails out of the sequence. There are several other sub-steps, but they’re really not that important, nor is it necessary that you know them. It should also be noted that:

  • The process is done for each printer defined on the client.
  • For the most part, locally attached client printers auto-create faster than the network ones.
  • The first printer that connects, even though it may not be defined as the user’s default, becomes the temporary default in the session until the actual default is mapped.

Best Practices

Seeing the components and the process Citrix uses to connect printers, it’s still a challenge to have consistent and reliable printing. Yes, EMF performance enhancements have been great, but it’s consistency, or lack there of, that generates the most support calls (which, without a doubt, is the bane of the Citrix admin’s existence). It’s usually easier in a controlled environment, however, in an environment where a strict printing standard can’t be adopted, it’s a nightmare. Properly setting up your environment is a must and regardless of how it’s done, it needs to include the following:

  • Avoid loading third-party print drivers--especially drivers that are not specifically documented to be compatible with terminal services. This has, was, and still is the number one cardinal rule. Back in the NT 4.0 TSE days, third-party drivers accounted for most of the BSoDs. These days, the “good” news is that it may only cause your spooler to tank out.    
  • Remove all version-2 drivers. These types of drivers run in kernel mode and cause serious issues with the servers. Stick with Version-3 drivers which operate in "user mode."
  • Use native Windows 2000 or Windows 2003 OS drivers for all printers, even if some functionality is lost. This includes using them over the Universal Print Driver.
  • If additional functionality is really needed, map the client driver to another Windows 2000 or Windows 2003 OS driver that offers similar functionality. This isn’t always possible, but most users are satisfied with just being able to print and don’t mind killing an extra tree or two because duplex printing isn’t available.
  • Disable the loading of drivers on demand and/or importation of drivers from the client. This is important in keeping your environment clean and free of third-party drivers or other unwanted drivers.
  • Keep the combination of drivers and/or re-mapped drivers to minimum. The more places to parse during printer auto-creation, the longer the logon may take.
  • Ensure users have write access to %systemroot%\system32\spool on the server. Problems usually occur with overzealous, Sarbanes-Oxley compliant lock-down admins applying security settings.
  • If possible, print directly to the printer or print server and not through the virtual channel. Sorry, Citrix is meant to be thin--why clog the pipe with a print job if you don’t have to?
  • Old print jobs in the spooler should be cleaned up periodically. This should be done through a common maintenance script.
  • Do not load Hotfixes because they are available. Ensure it fixes something that is actually broke. Basically, if it ain’t broke, don’t fix it.

Step by Step

Using all of this information, it’s time to put it to together and build a solution around it. Working under the assumption that you’re setting up a new environment and a have clean slate. Start by:

  • Setting up your policy
  • Installing your drivers
  • Re-mapping your printers

Create Your Farm Print Policy

Your farm’s print policies will vary in your particular environment and will always be dictated through the needs of your user base. The following settings seem to be the sweet spot for most farms that have users coming in from the Internet on untrusted clients. It uses native drivers over the UPD, and is applied to all servers as a default.

Printing

Setting

Configuration

Client Printers/Auto-creation

Enabled

Auto-create all client printers

Client Printers/Legacy client printers

Enabled

Create old-style client printers

Client Printers/Printer properties retention

Enabled

Held in profile only if not saved on client

Client Printers/Print job routing

Enabled

Always connect indirectly as a client printer

Client Printers/Turn off client printer mapping

Not Configured

 

Drivers/Native printer driver auto-install

Enabled

Do not automatically install drivers

Drivers/Universal driver

Enabled

Use universal driver only if requested driver is unavailable

Drivers

Remarkably, you can run your entire farm with less than 25 drivers and all third-party drivers can and should be removed. These drivers ship with the operating system and serve as a good base for any environment.

  • Canon Bubble-Jet BJC-210
  • Canon Bubble-Jet BJC-4000
  • Generic / Text Only
  • Epson Stylus COLOR ESC/P 2
  • HP Color LaserJet
  • HP Color LaserJet 4500
  • HP DeskJet
  • HP DeskJet 550C
  • HP DeskJet 850C
  • HP DeskJet 855C
  • HP LaserJet
  • HP LaserJet Series II
  • HP LaserJet 1100 (MS)
  • HP LaserJet 2100
  • HP LaserJet 4
  • HP LaserJet 5
  • HP LaserJet 6P
  • HP LaserJet 4000 Series PCL
  • HP LaserJet 8100 Series PCL
  • HP OfficeJet
  • Lexmark Optra
  • Lexmark 1020 Color Jetprinter

The easiest way to load these is to simply walk through the “Add a printer” wizard one-by-one. You can get creative and write a script however you only need to do this once because they can be replicated. The drivers can also be integrated into your Citrix base build.
So that additional drivers don’t accidentally get installed, it’s also a best practice that you rename %systemroot%\inf\ntprint.inf to ntprint.old.

Replicating Drivers

Using Citrix’s print driver replication feature, the drivers can be loaded on one of your servers and then replicated to all of the servers in the farm. In larger Citrix Farms, replicating drivers can cause performance issues, so you may want to create a print package that can be redistributed.

Creating a package is a simple process:

  • Start with a clean, freshly installed server
  • Copy the directories and files from %systemroot%\system32\spool\drivers
  • Export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3
  • Write a wrapper script similar to:

REM Backup Files and Registry
@IF NOT EXIST MD c:\temp\printback
@XCOPY /E /H /Y %systemroot%\system32\spool\drivers c:\temp\printback\
@REG EXPORT "HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3" c:\temp\printback\printers.reg

REM Removing Print Drivers
@REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3" /F
@RD /S /Q %systemroot%\system32\spool\drivers\color
@RD /S /Q %systemroot%\system32\spool\drivers\w32x86

REM Installing New Print Drivers
@XCOPY /E /H /Y color %systemroot%\system32\spool\drivers\color
@XCOPY /E /H /Y w32x86 %systemroot%\system32\spool\drivers\w32x86
@REG IMPORT PrintDrivers.reg

REM Restore
REM @XCOPY /E /H /Y c:\temp\printback\color %systemroot%\system32\spool\drivers\color
REM @XCOPY /E /H /Y c:\temp\printback\w32x86 %systemroot%\system32\spool\drivers\w32x86
REM @REG IMPORT c:\temp\printback\printers.reg

@NET START SPOOLER

  • Bundle it all together as a self executing zip file. InstallShield Packager for the Web (if you can still find it) is a great utility for this type of work.

Re-Mapped Drivers

Now that you have a good driver base, it’s time to re-map to them. You can do this a couple of different ways. Downloading and importing somebody else’s remapping file isn’t necessarily the best since your environment is more than likely unique. You’re bound to get a number of unnecessary re-mappings, thus violating best practice #6. Under that premise, the easiest approach is to use Doug Brown’s Advanced Print Manger (APM) from http://www.dabcc.com/apm . If you get the answer “it’s not in the budget,” then the re-mappings will have to be done manually using two different processes:

Manual Process #1

  • Filter the event view for printer failures – 1106 and 1007 messages
  • Parse through it and just grab the printer name.
  • Look up the printer at www.printingsupport.com and find a comparable driver
  • Create a text/inf file and manipulate so it resembles a wtsprnt.inf.
  • Import using qprinter /IMPRMAPPING C:\MyMappings.INF

Manual Process #2

  • Dump the event view for printer failures – 1106 and 1007 messages
  • Look up the printer at www.printingsupport.com and find a comparable driver
  • Re-map them one-by-one in the CMC.

Six out of Seven Citrix Admins agree: stick with APM. It’s easier to use and you’ll be done in half the time. It polls the event logs for failed mappings and displays them in a consolidated, readable format along with a suggested re-mapping.

If a recommendation isn’t available, the following table can be used as a simple guide or starting point for re-mappings. Of course you’ll need to test them to ensure they work. Further, since support is being added for a printer that is currently unavailable to the user, adding these mappings during production hours is a minimal risk. 

Printer Type

Remaps to

Default

HP LaserJet
HP LaserJet Series II
HP LaserJet 4
HP LaserJet 5

Amyuni

HP LaserJet 5

Brother

HP LaserJet 4

Canon Bubble-Jets

Canon Bubble-Jet BJC-210
Canon Bubble-Jet BJC-4000

Epson

HP LaserJet 4
HP LaserJet 5

Epson Stylus

Epson Stylus COLOR ESC/P 2

HP DeskJet Series

HP DeskJet
HP DeskJet 550C
HP DeskJet 850C
HP DeskJet 855C

HP LaserJet Series

HP LaserJet
HP LaserJet Series II
HP LaserJet 4
HP LaserJet 5

HP LaserJet 1000 series

HP LaserJet 1100 (MS)

HP LaserJet 2000 series

HP LaserJet 2100

HP LaserJet PCL Series

HP LaserJet 4000 Series PCL

HP OfficeJet Series

HP OfficeJet

Lanier

HP LaserJet 4000 Series PCL

Konica

HP LaserJet 4

Lexmark Default

HP LaserJet 4

Lexmark Jetprinter series

Lexmark 1020 Color Jetprinter

Lexmark T Series

HP LaserJet 4
HP LaserJet 5

Lexmark Z Series

UPD

Lexmark Optra Series

Lexmark Optra

Ricoh

HP LaserJet 4

Color Printers

HP Color LaserJet

PDF Writers

HP LaserJet 5
HP Color LaserJet 4500

Fax Printers

Generic / Text Only

Conclusion

As mentioned in the beginning of this article, the above printing configuration has been field tested several times over, from MetaFrame 1.8 all the way to Presentation Server 4.0. Once it’s set up, the administrative overhead is minimal, with only the occasional new mapping being added. Wrapping a process around it might prove to beneficial as well. But this still proves to be the most reliable approach for printing in Citrix. Maybe they’ll prove it wrong in 4.5.

Join the conversation

39 comments

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

Great, thanks.Another tool for replicating printer drivers is to use Microsoft's Printer Migrator... http://www.microsoft.com/WindowsServer2003/techinfo/overview/printmigrator3.1.mspx 
Cancel
Hi Kevin, this is a really helpful article!
I would like to ask if you could extended the article to cover the different aspects of client printer remapping / Universal Printer Driver 4 / using Session Printer.
Especially ist would be iteresting to see the difference in the creation process of a Session Printer compared to a Cuatocreated Client printer.
 
Good work!!
 
 
Cancel
Is there a list somewhere of supported Citrix Printers?
Cancel

In this session we will address how Citrix Presentation Server 4 printing architecture addresses real world dilemmas such as "new printer" headaches and full support for home users. We’ll take a look "under the hood" to address in-depth UPD 2-4x faster printing performance, print data compression and client printer security. You’ll receive important facts about known issues and hot fixes. There will even be a Tips & Tricks section covering customizing print environments, retained & restored client printers and troubleshooting auto creation.

•Presentation Server 4 printing enhancements
• Reengineered printing subsystem
• Session Printers Policy rule
• Advanced Universal Printing

• In Depth - Technical details
• UPD performance
• Print data compression
• Printing subsystem customizations

• Troubleshooting printing issues
 
Both the audio and the video can be accessed via the link below:
http://www.citrix.com/TechTalk/PS4Printing
Cancel
The number of drivers is so vast, no defnitive list of safe drivers exists, but you can use the AddPrinter utility from CTX109374 to test a driver
 
Check out R02 and CTX108763 for some printing fixes and enhancements
 
Barbara O'Grady
Citrix
Cancel
SUPER!!!
 
ALEX
Cancel
For those of you running multiple tray's in laserjet series, make sure to map to "HP LaserJet 4M Plus' and "HP LaserJet 5N".
(better match then basic LaserJet 4 + 5.)
 
Stefan
http://www.printingsupport.com 
Cancel
ORIGINAL: xs4citrix

For those of you running multiple tray's in laserjet series, make sure to map to "HP LaserJet 4M Plus' and "HP LaserJet 5N".
(better match then basic LaserJet 4 + 5.)

Stefan
http://www.printingsupport.com 

 
I knew I forgot something basic like that.
 
Thanks, Stefan.
Cancel
If you're using HP Printers, there's a list published here:  for compatibility info.

Shawn
Cancel
Found it on http:  
 
Cancel
I've been using the LaserJet 4 Plus with all 4xxx model printers for a couple of years with great results, i.e. for 4000, 4050, 4200 and even 2300 series LaserJets I use the native LaserJet 4 Plus Driver.
Cancel
A lot of the 3rd party HP drivers have come a long way and are terminal server friendly now. However, unless you actually need some functionality that they offer, then stick with the HP drivers that ship with the OS; many of which use a common set of dll's.
Cancel
Am I missing something here, or does PS4 not replicate your printer drivers between servers in the farm automatically (if so configured)?
 
Cancel
Please be aware that as of last week's release of HRP2, drive mapping wildcards are now supported.
e.g. - HP* PCL* > HP LaserJet 4si
         Color Laser* > HP Color LaserJet PS
 
 
Watch Gary Barton's recorded webcast about this and much, much more regarding UPD at:
http://www.citrix.com/English/NE/events/byType.asp?etype=25531
It may not be posted just yet.
 
HRP2 for CPS4 can be downloaded at:
http://support.citrix.com/hotfixes.jsp?ntref=hp_nav_US
 
Also, read about the new HP universal print driver (30 mb) at:
http://support.citrix.com/article/CTX110571
 
 
 
Regards,
 
Frank Anderson
Cancel
where on printingsupport.com are the "compatiable drivers" list?
Cancel
This doc is really great for understanding printing
http://support.citrix.com/article/CTX108170
 
 
 
 
Cancel
Most organizations do not use automatic replication because of the issues of replicating drivers without any sort of control. 
Cancel
http://www.printingsupport.com/matrix.htm
 
It's a bit outdated though, on the latest models.
(i need to work on that)
 
Stefan
http://www.printingsupport.com
Cancel
I reconfigured my Win2k3 CPS 4.0 farm with the recommendations from above.  I removed the ton of print drivers form all the servers in the farm and only install the 30 or so base level printers recommended here.  I also defined a large number of additional printer mappings in a WTSUPRN.INF file.  However for some reason it seems like my WTSUPRN.INF file is not being read.  I end up with almost every client printer being mapped as a "Citrix Universal Printer."  This is not entirely bad except for the fact that we have identified several printers, Xerox especially, that do not work well with the new UPDIII universal driver.  I either get garbled output of no output at all.

My policy setting for printer mapping is set as recommeded here to "Use universal driver only if requested driver is unavailable".  Why is my WTSUPRN.INF file seeminly being ignored.  Instead of the client printer being mapped to the alternate local driver as defined in my WTSUPRN, just about every printer is being mapped to the universal driver.
Cancel
ORIGINAL: Guest

I reconfigured my Win2k3 CPS 4.0 farm with the recommendations from above.  I removed the ton of print drivers form all the servers in the farm and only install the 30 or so base level printers recommended here.  I also defined a large number of additional printer mappings in a WTSUPRN.INF file.  However for some reason it seems like my WTSUPRN.INF file is not being read.  I end up with almost every client printer being mapped as a "Citrix Universal Printer."  This is not entirely bad except for the fact that we have identified several printers, Xerox especially, that do not work well with the new UPDIII universal driver.  I either get garbled output of no output at all.

My policy setting for printer mapping is set as recommeded here to "Use universal driver only if requested driver is unavailable".  Why is my WTSUPRN.INF file seeminly being ignored.  Instead of the client printer being mapped to the alternate local driver as defined in my WTSUPRN, just about every printer is being mapped to the universal driver.


UPDATE to above..  I am now going to try and use qprinter to import my WTSUPRN.INF mappings into the farm using the below syntax:

qprinter /IMPRMAPPING C:\WINDOWS\system32\wtsuprn.inf

Is this a required step now with CPS 4.0?  I was under the impresison that I could just replicate my WTSUPRN.INF file to every server in the farm under the \windows\system32 directory and it would be read from there..


Cancel
"Most of the problems occur when administrators expect that printing will work out-of-the-box and are unfamiliar with how to properly set it up."
I guess this is very useful info if you do know how to configure printers.  I am new to Citrix and will use this article once I figure out how to setup printing all together.  If you can do a beginners article to printing, that would be great. 

Cheers
Cancel
Well R02 breaks more then it fixes :) I think we have to wait for numerous hotfixes that fix stuf in R02.

cheers.
 
And for the HP printers you can install the universal printer driver from HP :)
Cancel
Why not try one of the 3:rd party universal printer drivers out there?
I know they cost money but writing that script does to.
 
ScrewDrivers can pick up those settings for you if the local driver is following printing standards.  www.tricerat.com
 
Other 3rd party printing products may also help and can be found under the topic of printing on www.brianmadden.com
 
Cancel
When Citrix Auto-creates a printer using the Citrix Universal Driver can we disable "Enable Advanced Printing Features" in the Advance Tab of the properties?  If yes, where would we do this? Basically, I want this feature unchecked when Citrix Auto-creates the printer.
 
Thanks, JHD
Cancel
Have you received any reply on this request?  We would like to do the same to fix a printing problem from a JAVA base application.
 
Thanks
 
SG
Cancel
Right now we map printers by global policy vbs scripting based on your location and department. So if i'm understanding this right, we do not want that and map the network printers to a citrix server then replicate them across the farm? correct.
 
by the way our current farm which i inhiereted was setup that way. it doesn't work very well.
Cancel
ORIGINAL: Guest

When Citrix Auto-creates a printer using the Citrix Universal Driver can we disable "Enable Advanced Printing Features" in the Advance Tab of the properties?  If yes, where would we do this? Basically, I want this feature unchecked when Citrix Auto-creates the printer.

Thanks, JHD


Check this on the CPS4 Rollup pack 2 readme :

For certain printer drivers, changes made to printer properties or advanced printer settings within a session do not persist between sessions.
This is the server-side component of an enhancement that allows you to modify the client-side appsrv.ini file to set the client to always use the printer settings from the actual printer rather than the retained settings in the properties store. This setting also forces the client to attempt to write settings modified within a client session to the client printer if the drivers are determined to be equivalent.To get the full benefit of this enhancement, you must also deploy Hotfix Client 9.200 or later of the Presentation Server Client and add the following line to the section of the client-side appsrv.ini file:
Win32FavorRetainedPrinterSettings=Off
This fix also adds the capability to inherit, retain, and restore the following settings from a printer's Advanced tab:
    * Spooled versus print directly to printer
    * Wait for last page or start immediately
    * Enable/disable advanced printing features
    * Give preference to complete jobs


Frederic Serriere
Citrix Systems
Cancel

I am having one Citrix metaframe XPA server, On My pc installed one windows network printer. Citrix Server its automatically creating the printer but its not printing on the client printer. It is not even spool to client PC. giving error itself on the printer server.

Please advise how i can proceed to solve this

Cancel
Is there a method to deny auto client pdf printers from being installed?
Cancel

From the same application, I am abile to print to specific paper trays on the same printer by setting up a second printer with the same IP and setting specific printing defauts on each printer.  However, when I acces the application through Citrix, I am unable to print to the specific trays.  Once I have chosen a printer(tray) and print to it, I cannot print to the other tray, even if I select the other printer inside the application.

 Any suggestions?

Cancel

Is there a way to not map&create ActiveTouch Document Loader while logging into Metaframe 1.8 XP?

Tried: "ActiveTouch Document Loader"="" from CMC, wtsuprn.inf. It still creates with UPD.

Tnx

Cancel

I am pretty much going though the printer policies and confused which is the best option to select.  On the article it is stated that 

If possible, print directly to the printer or print server and not through the virtual channel. Sorry, Citrix is meant to be thin--why clog the pipe with a print job if you don’t have to?

But on the table it says the policy selected is to "Always connect indirectly as a client printer" which will you use the ICA channel, Just want to ask what is the best option to select between the two.

Thanks

Cancel

Our company has recently picked up a new customer with a 4 server Citrix farm, and I'm trying to clean up and try and trying to make some sence into why the previous company configured the servers the way the did. What I would like to know is whould there be any advantage to having the printers setup on the citrix servers themselvs "vs" having the printers setup on another print server on the network ? 


Cancel

you will get an answer to this if you post it on one of the Forums: <a href="/forum" target="_blank">www.brianmadden.com/.../a>


Cancel

WHen user logs onto the citrix client none of the printers are set for the session.  When I log on, the printers appear.  I have admin rights.


Cancel

Just wondering if anyone can confirm this. Are the HP PCL Drivers, specifically HP LaserJet 4000 Series PCL more bandwidth friendly then using lets say the HP LaserJet 4 driver? trying to conserve on as much bandwidth as possible but also stay with a driver that will be terminal server friendly.


Cancel

Does any recommend a 3rd party print software? We are on Presentation 4.5 on Windows Server 2003. I'm looking for a 3rd party software to handle my Citrix printing. Any good recommendations?? Thank you, Kevin


Cancel

The script proposed breake the Citrix Universal Driver...


Cancel

The do not break any thing, but need to stop spooler before, and restart cpsvc at the end of the script.Thanks for this article.


Cancel

-ADS BY GOOGLE

SearchVirtualDesktop

SearchEnterpriseDesktop

SearchServerVirtualization

SearchVMware

Close