add fix color proposal

This commit is contained in:
juergen committed 2026-10-20 07:30:09 +02:00
1 parent 843c6866a5
commit 75b68fe438
7 files changed
+407 -4

No files matched your search

@@ -0,0 +1,72 @@
# Spec Delta
## ADDED Requirements
### Requirement: Queue defaults are configurable at runtime
The container SHALL accept a `PRINTER_OPTIONS` environment variable holding
space-separated PPD option assignments (`key=value`) and apply each assignment
as a queue default on every start, so PPD-specific device options survive the
recreation of the queue.
#### Scenario: Options are applied on start
- **WHEN** the container is started with `PRINTER_OPTIONS="BRColorMode=Vivid TonerSaveMode=False"`
- **THEN** after startup the queue defaults include `BRColorMode=Vivid` and `TonerSaveMode=False`
#### Scenario: Defaults apply to driverless clients
- **WHEN** a macOS or iOS client prints a job that does not specify that PPD option
- **THEN** the job is printed with the configured queue default
#### Scenario: An unusable option must not stop startup
- **WHEN** `PRINTER_OPTIONS` contains an option name or value the PPD does not provide
- **THEN** the entrypoint logs a warning, applies the remaining assignments and continues starting
#### Scenario: Nothing configured
- **WHEN** `PRINTER_OPTIONS` is unset or empty
- **THEN** the queue keeps the PPD defaults and the container starts as before
### Requirement: Colour output is saturated by default
Unless overridden through `PRINTER_OPTIONS`, the queue SHALL default to the
colour mode `None`, which leaves the printer's CIE colour conversion
(`UseCIEColor`) switched off so that printed colours are not washed out.
#### Scenario: Default colour mode
- **WHEN** a colour job is printed without any colour-mode options
- **THEN** the emitted PostScript contains `<</UseCIEColor false>>` rather than `UseCIEColor true`
#### Scenario: Default is overridable
- **WHEN** the container is started with `PRINTER_OPTIONS` containing `BRColorMode=Vivid`
- **THEN** the queue default is `Vivid` instead of `None`
#### Scenario: A job's own selection wins
- **WHEN** a job explicitly selects another `BRColorMode` value
- **THEN** that value is used for the job instead of the queue default
## MODIFIED Requirements
### Requirement: Hardware options are sent to the printer
The system SHALL translate the PPD's device options into PostScript
`setpagedevice` instructions so the printer's own hardware options are used.
#### Scenario: Paper source
- **WHEN** a job selects an input slot (auto select, a tray or the MP tray)
- **THEN** the emitted PostScript selects the corresponding paper source on the printer
#### Scenario: Duplex
- **WHEN** a job selects long-edge or short-edge two-sided printing
- **THEN** the emitted PostScript sets `/Duplex` and `/Tumble` accordingly
#### Scenario: Colour or mono
- **WHEN** a job selects colour or mono
- **THEN** the emitted PostScript sets the corresponding colour/mono device parameters
#### Scenario: A driverless client selects black and white
- **WHEN** an AirPrint/IPP client sends `print-color-mode=monochrome`
- **THEN** the emitted PostScript sets the mono device parameters (`/BRProcessColor 1`) and the job prints in black and white, independent of the PDF renderer used by the server
#### Scenario: A driverless client selects colour
- **WHEN** an AirPrint/IPP client sends `print-color-mode=color`
- **THEN** the job prints in colour and the emitted PostScript disables toner saving
#### Scenario: A driverless client selects the print quality
- **WHEN** an AirPrint/IPP client sends `print-quality=draft`, `normal` or `high`
- **THEN** the emitted PostScript selects the mapped device settings: toner saving for draft, full toner for normal, and the `CAPT` high-resolution setting for high