Skip to content

fix(cups): preserve explicit false PPD options - #17

Draft
kduma wants to merge 2 commits into
mainfrom
fix/cups-false-options
Draft

kduma wants to merge 2 commits into
mainfrom
fix/cups-false-options

Conversation

@kduma

@kduma kduma commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

The CUPS protocol drops boolean false PPD options before invoking lp. When a printer's default is enabled, an explicit disable from the client therefore does not override it. For example, MirrorPrint=false is omitted entirely.

Preserve both boolean values as True/False arguments. Choice values remain unchanged, and RAW still uses its existing bare -o raw flag. The regression test exercises the command boundary and prepared bytes without invoking a physical printer.

Validation:

  • The new PPD regression fails before the fix because -o 'MirrorPrint=False' is missing.
  • All 24 Pest tests pass on PHP 8.3 and on PHP 8.1 in the official service runtime; Pint passes for both changed files.
  • The PHAR builds successfully and runs in the official Docker runtime.
  • Studio's production Android HTTPS client → WebPrint Server → this service → a real CUPS scheduler with a virtual native-PDF capture backend passes for RAW and PDF. Output hashes match, A4/one copy are retained, and CUPS receives explicit false (represented as noMirrorPrint in its backend arguments). The same test fails against the published service image because that option is absent.

The integration uses the separate WebPrint Server PPD type fix in kduma-OSS/WebPrint-Server#69. No deployment, image publication, model-specific driver conversion or physical-print acceptance is claimed.

The PHAR workflow also replaces retired upload-artifact@v2.2.4 with v4; GitHub rejected the old action before compilation. Tests, Pint and the PHAR build now pass in CI. The Docker workflow is disabled by inactivity and has not been enabled; publishing remains a separate step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant