Terminal Server Printing

0 views
Skip to first unread message

Kum Filteau

unread,
Aug 5, 2024, 3:03:45 AM8/5/24
to tespademu
Startingwith the WDK for Windows 11, version 22H2, WDF redistributable co-installers are no longer supported.To learn how to work around this change, see WDF redistributable co-installers don't work in the WDK known issues article.

Microsoft Windows supports Terminal Services, a technology that allows multiple users to connect to a single server system. This server system is called a terminal server. For a detailed discussion of Terminal Services, see the Windows SDK documentation.


If you're developing a printer minidriver or driver for Windows, you don't have to do anything special to support printers connected to terminal servers. However, you must follow all design, implementation, and installation guidelines specified in the Windows Driver Kit (WDK). Specifically, you must use the following rules:


All custom driver code must be reentrant. User-mode code should employ critical section objects (described in the Windows SDK documentation). Kernel-mode code should use semaphores (see EngCreateSemaphore and related functions).


Printer drivers and custom spooler components must access the registry only through interfaces provided specifically for these drivers and spooler components, as described in appropriate sections of the WDK.


Usually, all you need to do for installation is provide an INF file that can be read by Microsoft's printer class installer when a user invokes the Add Printer wizard. Sometimes, custom setup code (a co-installer or class installer) is also needed. If you must create custom setup code, remember the following:


If a file must be replaced, the setup code should take steps to unload the old version and then load the new version (for example, by stopping the driver service, replacing the file, then restarting the service).


Almost all printer driver code runs in the spooler's execution context and therefore can't display a user interface. User interfaces can be displayed only by printer interface DLLs, and only from within the following functions:


The DrvPrinterEvent function, which receives event codes identifying printer events. The function can display a user interface only for the PRINTER_EVENT_ADD_CONNECTION and PRINTER_EVENT_DELETE_CONNECTION event codes.


All other printer driver code executes in the spooler's context. From this context, calling MessageBox or MessageBoxEx is allowed, but you must set MB_SERVICE_NOTIFICATION. These functions are described in the Windows SDK documentation.


Basically I added our printers onto our main file server and deployed them with a GPO. They show up on our terminal servers as \fileserver\printername. Currently in this environment I have 3 servers that people log into with Citrix.


So far our issues have ranged from severely laggy printing (clicking print button, program freezes for 2 minutes and then prints), to errors popping up that the printer is disconnected. The error read as such:


We had a very similar issue on our RDS farm. Have you ensured that the latest driver is installed and MS updates are fully up to date? We had an issue with both of those being the cause, and the perfect storm was created because of it.


Save your sanity and install the drivers directly on the terminal servers. Some applications are notorious in how they apply printer naming conventions. a fully qualified printer name of \Server\printername will be interpreted differently than printername. We had to do this because logging into our ERP solution on the terminal server created the problem below.


- Improved printer redirection stability

- Fixed print issue with TSPrintEMF orientation

- Fixed the 'Open Locally' issue with the temp directory

- Fixed issue with communication error for Mac clients

- Fixed issue with pages being printed infinitely on a redirected printer.

- Fixed issue with background TSPrint PDF save dialog on client

- Fixed issue with MaxCopies on TSPrint Printer client dialog

- Fixed issue with user-defined client dialog cancel

- Fixed add printer issue with Windows Driver

- Solved server "Send Email" issue with Outlook


- Solved TSPrint Server issue with multiple security software

- Solved issue with select User Defined printer

- Solved crash issue with client session in session

- Solved several minor issues with UI

- Solved issue with MSRDC crash

- Solved issue with redirected print on the local default printer


- Solved server "Send Email" issue with Outlook

- Solved issue with client installation on ARM64

- Solved Mac issue with duplex

- Solved print issue with raw job

- Solved EMF printing issue with communication error

- Improved stability


- Solved issue with automatic client update on older versions

- Solved a problem when temp log files were created on the server

- Fixed issue with Open locally for Mac clients

- Fixed compatibility issue for older Mac clients

- Solved problem with GDI error on redirected printer

- Solved problem with offline printer redirection


We have a terminal server that is only being used by two users for the next couple weeks however both of them are having issues usually not at the same time but has happened where they are not being able to print PDF's but are able to print word docs etc.


We have tried updating the drivers, uninstalling Adobe Reader and reinstalling, restarting print spooler and a few other things but the only resolution is actually restarting the server which cannot be done every time and I need to resolve this before everyone migrates from the old server.


I might add that we push the printers from a print server (also 2012R2) via GPO. Everything else works with printers, Microsoft Navision C5, Office 2016, notepad. We have an idea, that the problems happen, when more users is logged on and using Acrobat Reader. We're running the latest Adobe Reader DC.


It actually doesn't say that. It just does nothing, when trying to print. But when You prin eg. 4-10 pages, You get a glimpse of a progressbar, that indicates that Adobe Reader is generating/creating print, when problem is there, You don't see that.


It happens to random users, so the problem can't actually be reproduced, unless the user allready has the problem. If the user is loged on, and has the problem, You can reproduce the problem each time You try to print the PDF.


Printers GPO deployed from Print Manager on DC to Terminal server. Right now, We're using WinPrint Print Processor for as many printers as possible + using Driver isolation, dont use render on client.


i have a customer experiencing the same issue, they actually get an error message that says "the document can't be printed" followed by "there were no pages selected." like everyone else users cant print word docs, excel, web pages without issue. i have tried deleting re-adding the printers, updating the print drivers, but the problem gets reappearing sporadically. any insight would be greatly appreciated.


We have the same problem in terminal server 2012. In Default, everything is working fine, then random times users can't print pdf but word, excel, notepad etc. work fine, Not all users, only one user in time The only repair method is to delete the printer in his profile, and let the gpo (gpupdate /force) install the printer. Logout-login and working fine again. there is one visible difference in a printing widow, is the " print both sides on paper" doesn't show up. We tried everything drivers, adobe reinstall, change the printer deployment but the problem still occurs.


Everything else worked with deployed printers, but not PDF printing. I tried diferent PDF readers (FoxIt, Sumatra, PDF complete), they all had issues. I think the one that worked best was PDF Complete, but since it wasn't stable, I installed all printers local on TS with no GPO deploy). Not a very nice installation, but the only way to get it to Work permanently, unfortunately.


We have exactly the same problem. Our terminal servers are running windows server 2016. Same with our print server. We are using GPO mapped printers. We are using the latest version of Adobe Acrobat. I just called Adobe support. There is a know bug issue that depicts this problem exactly. However, I'm waiting for a call back from them to get more information and timing for the bug fix. I'll re-post once I hear back.


Sounds great, looking forward to see what the Adobe Guys have to say. I've used a lot of time trying to get this to Work, but never got an answer. I could imagine, it is something between Microsoft and Adobe, since I could replicate similar problems with other PDF Readers. Still I must emphase that my problems was with Acrobat Reader, not Acrobat.


Off Tropic: I also have customers that have problems with Adobe Reader process RdrCEF.exe using up a lot of RAM and CPU power for multible users - Also in a TS enviroment, so be aware, that You could have challenges there to.


What we experience is that, people call us and say they cannot print PDF files, the progress bar doesn't show up, and nothing happens.

They can print from Word, excel, mail just fine, but not PDF files. first I though it was their profile, and after giving them a new profile it worked, however, later we discovered that it might not be related to their profile, but it was the server, so giving them a new profile just gave me the illusion that fixed the problem, but after they logged on they most likely got on a new citrix server.

3a8082e126
Reply all
Reply to author
Forward
0 new messages