1. John Raghanti
  2. PowerBuilder
  3. Friday, 17 January 2020 14:46 PM UTC

Hi. As more of our clients are being migrated to the PB 2019 version of our software, we have been getting calls about Windows default printer differences. Some of our users change the Windows default printer while our software is open.

In PB 12.5, it seems as though printed items always went to the system default printer, even if it was changed while our software is open.

With PB 2019, it only uses the printer that was set as the Windows default printer when the application was opened. If the default printer is changed mid-stream, it is ignored?

I read something on the forum about changing to an API for getting the printer driver, but I wasn't sure why. Could someone explain or point me to documentation about what happened and why? I need to provide an answer to management... :)

If needed, is there a way to revert to the way it previously worked?

Thanks!

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 17 January 2020 17:12 PM UTC
  2. PowerBuilder
  3. # 1

Hi John;

  Is your PB App(s) using the PrintGetPrinters command along with the PrintGetPrinter and PrintSetPrinter commands to control what printers are available, using and upon an App restart, restoring the default printer back to the one that the App User last requested?

Regards ... Chris

Comment
There are no comments made yet.
John Raghanti Accepted Answer Pending Moderation
  1. Friday, 17 January 2020 17:38 PM UTC
  2. PowerBuilder
  3. # 2

Hi,

We do not use those. We do give the user the ability to call PrintSetup() and select a printer for their session. I'd say most users don't use that ability and rely on their windows default printer. Then in general, we simply call dw.Print() without any special coding.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 17 January 2020 23:09 PM UTC
  2. PowerBuilder
  3. # 3

John -

   When a user has more than one printer and the last printer they selected, their DEFAULT printer, is not the first printer in the list, perhaps on occasion the system-defined default printer is changed to be the first printer in the Windows list of printers.

   I had that happen to me with code as far back as PBv11. As long as you select the correct printer and set it as your default, and as long as you are in the current session, the s=printer selection remains set. Once you leave the session, or you reboot the platform, suddenly the default printer becomes the first one on the list.

   I had to write code to keep the last selected default printer as THE default printer when the app started up.


Later -

Olan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.