fix pale colours and map driverless print options
ci/woodpecker/push/build Pipeline was successful

Set *DefaultBRColorMode: None in the vendor PPD so every job sends
<</UseCIEColor false>>: Brother's Normal/Vivid modes enable the printer's
own CIE conversion, which washed the colours out.

Add six APPrinterPreset entries mapping print-color-mode and
print-quality from driverless (AirPrint/IPP) clients onto the Brother
device options; they use the notation CUPS generates itself (Apple
metadata as 'key value' pairs, PPD options as '*Name Value'), because
key=value strings are silently discarded. print-quality is 3/4/5.

Add the PRINTER_OPTIONS env var: whitespace-separated key=value pairs
applied as queue defaults on every start via lpadmin -o, validated
against the queue's PPD, with warnings instead of a failed startup.

Document all of it in the README. The VividNoCIE candidate was dropped
after test prints showed no difference from None. Archive the OpenSpec
change and sync the printserver/cups spec with the two new
requirements.
This commit is contained in:
juergen committed 2026-10-20 08:28:08 +02:00
1 parent 75b68fe438
commit 30670de93b
9 files changed
+319 -33

No files matched your search

+51
View File
@@ -54,6 +54,57 @@ The system SHALL translate the PPD's device options into PostScript
- **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
### 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
### Requirement: Jobs are printed via direct PostScript
The container SHALL forward the converted job as PostScript to the printer
without a server-side vendor filter or host-side rasterisation.