Hi there,
We have recently migrated from PB 2017 to PB2019 R2 build 2328.
Our application being assessed thru Citrix.
Application is not recognizing OS Windows 10 default printer.
it always prints to the last printer in the printer list.
I have tried the workaround as indicated in knowledge base
Windows API for GetDefaultPrinterW even it is showing up the last printer on the list as default printer.
Workstation does have a default printer set properly.
When we call printsetup(), it shows all the OS printers correctly, the issue is not the correct default printer is set.
When I run the same application PB2017 exe, default printer get set correctly without even calling windows API.
Any help is much appreciated.
Thanks
Selvam
I tried using pb.ini with "[Application] Citrix=1" with PowerBuilder 2021 GA (build 1311) in Citrix (on Windows Server 2016), but the application has two problems.
1. If the user prints (a window, or a RTE, for example) without ever opening the "PrintSetup()", then the application prints using the "last printer in the printer list", instead of the default printer that the local computer/citrix have set.
2. Every time the user opens the "PrintSetup()" (available in the applications menu, for this application), the selected printer reverts back to the default printer that the local computer/citrix have set, rather than the printer selected by the user when they last used "PrintSetup()".
Are these powerbuilder bugs?
Or due to not using the settings correctly?
Is there a way to have the correct printer set automatically, without having the user execute "PrintSetup()" prior to the first time of any printing?
Cheers, Peter.
P.S. Our citrix environment is siloed off from me, so it is hard to do experiments, sorry.
For issue #1, this is a Windows feature. Please confirm whether you have enabled "Let Windows manage my default printer" (Windows--->Settings---->Devices--->Printers & scanners painter). If yes, please turn it off and see if it resolves the issue.
For issue #2, it may be related to #1 and it is probably the correct behavior.
For a Citrix environment, since it requires pb.ini with "[Application] Citrix=1" settings, I recommend you specify the default printer in your code after the program starts.