Understanding Printer Settings and DEVMODE
Note
DEVMODE data structure is part of the GDI Print API structure in Windows. This section includes highly technical content, relevant only for specific requirements.
Whenever you print labels with Loftware software (or any document in Windows applications for that matter), the printing application reads printer settings as defined in the printer driver and applies them to the print job. The same label can be printed using different printers just by selecting another printer driver. Each time, printer settings of a newly selected printer apply to the label.
Printing a text document using two different laser printers usually produces the same or at least a comparable result. Printing labels using two different label printers can produce very inconsistent results. To produce comparable results, the same label file might require additional printer driver settings, such as adjustment of offsets, speed, and temperature of printing. Loftware also applies printer settings to every printout. By default, printer settings are saved inside the label file for the selected printer.
What is DEVMODE?
DEVMODE is a Windows structure that holds printer settings (initialization and environment information about a printer). It contains two parts: public and private. Public part contains data that is common to all printers. Private part contains data that is specific to a particular printer. Private part can be of variable length and contains all specific manufacturer related settings.
-
Public part: This part encodes general settings that are exposed in the printer driver model, such as printer name, driver version, paper size, orientation, color, duplex, and similar. Public part remains unchanged any printer driver and does not support specifics related to label printers (thermal printers, industrial ink jet printers, laser engraving machines).
-
Private part: This part encodes settings that are not available in the public part. Loftware printer drivers use this part to store the printer model-specific data, such as printing speed, temperature setting, offsets, print mode, media type, sensors, cutters, graphics encoding, RFID support, and similar. Data structure within the private part of DEVMODE is a stream of binary data defined by driver developers.
DEVMODE Changing
DEVMODE data structure is stored in Windows registry. There are two copies of the structure: default printer settings and user-specific printer settings. You can alter the DEVMODE (printer settings) by changing the parameters in the printer driver. The first two options are Windows related, while the third option is available with Loftware software.
-
Default printer settings: These settings are defined in Printer properties > Advanced tab > Printing Defaults.
-
User specific settings: These settings are stored separately for each user in the user's HKEY_CURRENT_USER registry key. By default, user specific settings are inherited from the printer’s default settings. The user specific settings are defined in Printer properties > Preferences. All modifications here only affect the current user.
-
Label specific settings: Label author that uses Loftware software can embed the DEVMODE into the label. This makes printer settings portable. If the label is copied to another computer, printer settings travel with it. To embed printer settings into the label, enable the option Use custom printer settings saved in the label using Document Properties in Designer Pro. You can change the in-label printers settings by selecting Printer panel in Document Properties.
Applying custom DEVMODE to printout
In Loftware Automation, you can open a label file and apply a custom DEVMODE to it. When printing a label, its design is taken from the .NLBL file, and the DEVMODE applies the specific printer-related formatting. This allows you to have a single label master. In such case, label printout remains the same no matter which printer you use for printing because optimal settings for that printer are applied.
To apply a custom DEVMODE to a label, you can use two options:
-
Using an action, more specifically parameter Printer settings.
-
JOB command file, more specifically command SETPRINTPARAM with parameter PRINTERSETTINGS. For more information, see Using Custom Commands.