bug(print): Printer driver preferences (DEVMODE) not applied during Windows printing #36

Closed
opened 2026-08-24 08:56:55 +01:00 by gronod · 0 comments
Owner

Problem Description

When configuring printer properties on Windows via the native driver preferences dialog (show_printer_properties / DocumentPropertiesW), customized driver settings do not appear to be applied to subsequent print jobs.

For example, when "Print Preview" is enabled in the OEM Epson printer driver preferences modal, no preview dialog is generated prior to printing when the target is spooled.


Steps to Reproduce

  1. Open ICCery and proceed to Stage 2: Print Target.
  2. Select a Windows destination printer (e.g., Epson driver).
  3. Click the Preferences (⚙️) button to open the OEM printer driver properties modal.
  4. Enable driver-specific settings (such as Print Preview, custom paper/media types, or quality presets) and click OK.
  5. Click Print Target.
  6. Observed Behavior: The target TIFF prints immediately to the spooler without generating a driver print preview or honoring the modified driver preferences.
  7. Expected Behavior: Driver preferences configured in the modal (including private OEM extensions like print preview, media type, and tray selection) should be passed to the print Device Context (CreateDCW) and honored during printing.

Platform Scope

  • Windows: Confirmed issue.
  • Linux (CUPS): Not yet tested.

Areas for Investigation

  1. Private DEVMODE Extension Retention (dmDriverExtra):
    • Win32 DEVMODEW structures contain a standard public header (dmSize) followed by vendor-private driver data (dmDriverExtra).
    • Investigate whether DocumentPropertiesW buffer management in src-tauri/src/print/windows.rs is properly retaining and forwarding the full buffer (public header + private driver data) when creating the printer DC via CreateDCW.
  2. Merging & Initialization:
    • Verify that passing the cached DEVMODE to CreateDCW or applying it before StartDocW correctly preserves OEM driver flags.
### Problem Description When configuring printer properties on Windows via the native driver preferences dialog (`show_printer_properties` / `DocumentPropertiesW`), customized driver settings do not appear to be applied to subsequent print jobs. For example, when **"Print Preview"** is enabled in the OEM Epson printer driver preferences modal, no preview dialog is generated prior to printing when the target is spooled. --- ### Steps to Reproduce 1. Open **ICCery** and proceed to **Stage 2: Print Target**. 2. Select a Windows destination printer (e.g., Epson driver). 3. Click the **Preferences (⚙️)** button to open the OEM printer driver properties modal. 4. Enable driver-specific settings (such as **Print Preview**, custom paper/media types, or quality presets) and click **OK**. 5. Click **Print Target**. 6. **Observed Behavior:** The target TIFF prints immediately to the spooler without generating a driver print preview or honoring the modified driver preferences. 7. **Expected Behavior:** Driver preferences configured in the modal (including private OEM extensions like print preview, media type, and tray selection) should be passed to the print Device Context (`CreateDCW`) and honored during printing. --- ### Platform Scope - **Windows:** Confirmed issue. - **Linux (CUPS):** Not yet tested. --- ### Areas for Investigation 1. **Private `DEVMODE` Extension Retention (`dmDriverExtra`):** - Win32 `DEVMODEW` structures contain a standard public header (`dmSize`) followed by vendor-private driver data (`dmDriverExtra`). - Investigate whether `DocumentPropertiesW` buffer management in `src-tauri/src/print/windows.rs` is properly retaining and forwarding the full buffer (public header + private driver data) when creating the printer DC via `CreateDCW`. 2. **Merging & Initialization:** - Verify that passing the cached DEVMODE to `CreateDCW` or applying it before `StartDocW` correctly preserves OEM driver flags.
gronod added the Kind/Bug label 2026-08-24 08:56:55 +01:00
Sign in to join this conversation.