Resolves#36 by ensuring that printer driver preferences (DEVMODE) configured in the native modal dialog (show_printer_properties) are retained and passed to the printer Device Context (CreateDCW) during Windows printing.
Changes
DEVMODE Preservation: Fixed print_target in src-tauri/src/print/windows.rs to retain cached DEVMODE buffers (including private OEM driver payload dmDriverExtra such as Epson Print Preview, media types, and quality settings) instead of resetting them to defaults via DocumentPropertiesW(..., DM_OUT_BUFFER).
Modular Option Overlay: Added apply_print_options_to_devmode to apply GDI ICM bypass (DMICMMETHOD_NONE) and UI option overlays (tray, orientation) onto DEVMODE structures without clobbering OEM vendor data.
Automated Unit & Integration Tests: Added test_windows_devmode_preservation_and_overrides in src-tauri/src/print/tests.rs to verify that private OEM driver extensions are retained through store retrieval and print options application.
Version Bump: Increment point version to 0.1.3 in package.json, package-lock.json, src-tauri/Cargo.toml, and src-tauri/tauri.conf.json.
Verification
28/28 unit and integration tests passed cleanly (cargo test).
### Summary
Resolves #36 by ensuring that printer driver preferences (DEVMODE) configured in the native modal dialog (`show_printer_properties`) are retained and passed to the printer Device Context (`CreateDCW`) during Windows printing.
### Changes
1. **DEVMODE Preservation**: Fixed `print_target` in `src-tauri/src/print/windows.rs` to retain cached DEVMODE buffers (including private OEM driver payload `dmDriverExtra` such as Epson Print Preview, media types, and quality settings) instead of resetting them to defaults via `DocumentPropertiesW(..., DM_OUT_BUFFER)`.
2. **Modular Option Overlay**: Added `apply_print_options_to_devmode` to apply GDI ICM bypass (`DMICMMETHOD_NONE`) and UI option overlays (tray, orientation) onto DEVMODE structures without clobbering OEM vendor data.
3. **Automated Unit & Integration Tests**: Added `test_windows_devmode_preservation_and_overrides` in `src-tauri/src/print/tests.rs` to verify that private OEM driver extensions are retained through store retrieval and print options application.
4. **Version Bump**: Increment point version to `0.1.3` in `package.json`, `package-lock.json`, `src-tauri/Cargo.toml`, and `src-tauri/tauri.conf.json`.
### Verification
- 28/28 unit and integration tests passed cleanly (`cargo test`).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Resolves #36 by ensuring that printer driver preferences (DEVMODE) configured in the native modal dialog (
show_printer_properties) are retained and passed to the printer Device Context (CreateDCW) during Windows printing.Changes
print_targetinsrc-tauri/src/print/windows.rsto retain cached DEVMODE buffers (including private OEM driver payloaddmDriverExtrasuch as Epson Print Preview, media types, and quality settings) instead of resetting them to defaults viaDocumentPropertiesW(..., DM_OUT_BUFFER).apply_print_options_to_devmodeto apply GDI ICM bypass (DMICMMETHOD_NONE) and UI option overlays (tray, orientation) onto DEVMODE structures without clobbering OEM vendor data.test_windows_devmode_preservation_and_overridesinsrc-tauri/src/print/tests.rsto verify that private OEM driver extensions are retained through store retrieval and print options application.0.1.3inpackage.json,package-lock.json,src-tauri/Cargo.toml, andsrc-tauri/tauri.conf.json.Verification
cargo test).