Default Printer and currentPrinter

The "default printer" is returned by the DefaultPrinter() method, but what exactly is the "default printer"? The documentation states:

"it is the name of the default printer (if any)."

Not very specific.

In fact, the "default printer" is the name of the system default printer if one is defined. (It is the value returned from the Win32 API PrintDlg when the flag value PD_RETURNDEFAULT is given).

The "current" printer is returned by the printer and currentPrinter properties.

These properties are usualy written to in order to specify the printer to use and will be the same as the default printer in a browser session initially.

Some specific examples

The value from DefaultPrinter() now is: unknown, the value from currentPrinter now is: unknown   

Two user actions can change the "current printer" - by using the print setup dialog or the prompted print dialog (which is basically the same thing but does perform the print).

A further action is that the current printer may be changed by script.

Select a printer:

But, using any of the above, the system default printer does not change - unless the OS is Windows 10 and "Allow windows to manage my default printer is enabled" is which case printing a document will change the system default printer to the printer used and this will be returned by a call to DefaultPrinter().

If you use the UI of your OS and and change the system default printer, the value returned by DefaultPrinter() will change, but currentPrinter will not.   

ScriptX.Services and DefaultPrinter()

ScriptX.Services 2.11.1 or later and ScriptX Client Library 1.7.1 or later do support DefaultPrinter() returning the current system default printer and does update when the system default printer is changed.

For ScriptX.Services 2.11.0 and earlier and/or ScriptX Client Library 1.7.0 and earlier, DefaultPrinter() is the value of the service default printer. When the service starts (for example, when a user logs on for ScriptX.Services for Windows PC) the service the service default printer is set to the system default printer. The service default printer does not update when the system default printer is changed.