User unable to print in Citrix
7:20 PMPrinter Driver not installed / Mapping not done properly
Printer Driver Mapping
1. Install the Driver on one Server.
2. After adding a driver on a server we must do this:
Open the Citrix Management Console, right-click the Printer Management icon and select the Update printer and Driver information option. Now it lists drivers we manually install individually on any server.
3. Update Printer and Driver Information by right clicking on Printer Management in the console as well as Refresh Printer Management. (The “Refresh Drivers” option does not produce the intended results. We have to do that after replicating printer drivers to other servers. Sometimes it appears in the list and sometimes it doesn't until I force it too.)
Just in case if you want to know more then find it below
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 |
Amyuni | HP LaserJet 5 |
Brother | HP LaserJet 4 |
Canon Bubble-Jets | Canon Bubble-Jet BJC-210 |
Epson | HP LaserJet 4 |
Epson Stylus | Epson Stylus COLOR ESC/P 2 |
HP DeskJet Series | HP DeskJet |
HP LaserJet Series | HP LaserJet |
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 |
Lexmark Z Series | UPD |
Lexmark Optra Series | Lexmark Optra |
Ricoh | HP LaserJet 4 |
Color Printers | HP Color LaserJet |
PDF Writers | HP LaserJet 5 |
Fax Printers | Generic / Text Only |
References :-
0 comments