How the Default Printer Is Selected
When the Print dialog is invoked, the procedure described below is used to select the default printer driver configuration file and the Windows printer, paper size, and tray names.
If the Print dialog has never been opened before, printer.pltcfg is selected as the default for the Windows printer driver. The search path defined by the MS_PLTCFG_PATH configuration variable is used to locate printer driver configuration files.
The Windows printer driver configuration file is used the first time the dialog opens, assuming that this setting has not already been overridden using configuration variables.
The Print dialog stores the active printer driver type and configuration file in the user preference file. When the Print dialog is subsequently invoked, the most recently used printer driver type and configuration file are selected by default. This behavior may, however, be overridden using configuration variables.
- If MS_DEFAULT_PLTCFG_FILE is set to a fully qualified printer driver configuration file, that file is loaded instead of the most recently used file when the Print dialog is opened.
- If MS_PLT_SYSPRT_PLTFILE is set to a fully qualified printer driver configuration file, that file will be used instead of printer.pltcfg when Windows driver is selected in the Print dialog.
In the event the selected printer driver configuration file cannot be loaded, you are prompted for a file name to use. If you abort the file selection box without selecting a file that can be loaded, the Print dialog attempts to load one of the following files.
If none of these can be loaded, the Print dialog cannot be opened.
If a Windows printer driver is loaded, the Print dialog must select a default Windows printer name, paper size name, and tray name. Normally, this information is obtained from the Windows default printer, but may be overridden using either the printer driver configuration file or configuration variables.
- MS_PLT_SYSPRT_DEFAULT_PRINTER specifies the printer name that is selected when a system printer is opened.
- MS_PLT_SYSPRT_DEFAULT_FORM specifies the paper size name that is selected when a system printer is opened.
- MS_PLT_SYSPRT_DEFAULT_TRAY specifies the tray name that is selected when a system printer is opened.
If the above configuration variables are not defined, you can specify the default printer, paper size, and tray names using the properties in the Windows printer driver configuration file.