How printers store their settings on Windows

 

Every printer stores all of it’s settings in the DEVMODE structure and stores the DEVMODE structure in the registry. The DEVMODE structure consists of a standard section and a printer specific section. The standard section (Windows DEVMODE) contains all of the common printer settings such as paper size and orientation.  The printer specific section contains all of the manufacturer specific settings.  For the Black Ice printer drivers, both the standard and the printer specific DEVMODE structure is defined in the BlackIceDEVMODE structure. All of the members of this structure are described later in this chapter.

There is a difference on how the different operating systems handle the DEVMODE structure, therefore each operating system is described separately.

Windows 11 / 10 / 8 / 7 / 2022 / 2019 / 2016 / 2012

Windows 11 / 10 / 8 / 7 / 2022 / 2019 / 2016 / 2012 stores more than one copy of the DEVMODE structure in the registry. There are default printer settings and user specific printer settings.

The best approach to changing the default printer settings is to specify the default settings in your products installation, using either a custom INI file or by setting the default settings from the BlackIceDevmode controls.

To set the printer’s default parameters, the Administrator has to select the printer’s Properties in the Printers window, select the Advanced tab and click the Printing Defaults button.

The user specific settings are stored separately for each user in the user’s HKEY_CURRENT_USER registry key.

By default, the user specific settings are inherited from the printer’s default settings. To change the user specific printer settings the user has to select Printing preferences or Properties-> Printing preferences and modify the settings he wants to change. All the modifications will affect the given user only. On Windows users have to have rights to modify user specific printer settings.

Every time an application wants to print to the printer, it will read the user specific printer settings and depending on how the application wants to print, can use these settings or it can change some of the settings. Changes made in the printer settings by using an application’s Printer properties dialog will not change the printer settings globally. The changes will be made for that given instance of the application only.