Skip to content

New psDevmodeDeviceName property

What is new - 25.0

Windows printer information contains two places where the device name is stored: the DEVMODE and DEVNAMES structures.

DEVMODE

  • Purpose: Identifies the name of the printer as recognized by the driver.
  • Source: Set by the printer driver.
  • Length Limit: Fixed-length string - limited to 32 characters (CCHDEVICENAME = 32).
  • Usage: Used internally by Windows to match settings to the printer driver.
  • Truncation: If the printer name is longer than 32 characters, it will be truncated in this field.

DEVNAMES

  • Purpose: Stores the full name of the printer for the print dialog.
  • Source: Typically set by the application or print dialog.
  • Length Limit: Variable-length strings (not limited to 32 characters).
  • Usage: Used by applications to identify and select printers.
  • Accurate name: This is where the full printer name (longer than 32 chars) is correctly stored.

Starting in version 25, the psDeviceName property now reflects the name from the DEVNAMES structure. To access the original value from the DEVMODE structure, a new semi-property named psDevmodeDeviceName has been introduced.