[Feature/Medium] Stage 2: Add paper size and print quality selection to printer details #183
Notifications
Due Date
No due date set.
Blocks
Reference: gronod/iccery-v2-mac#183
Reference in New Issue
Block a user
Summary
Stage 2 printer details selection allows selection of the printer, media type, and orientation, but not quality or paper size settings from the ICCery screen. The paper size should follow the setting selected at the top of Stage 1 (defaults to A4) and default to portrait orientation. Print quality options should be populated from the printer's capabilities (lpoptions -l / PPD).
Spec refs
PrintOptions.paperSize— the spec names itpaper_size; the Swift field is camelCase, PrinterModels.swift:100)Scope
selectedPaperSizeandselectedQuality@Published propertiespaperSizes: [PrinterPaperSize]— wire it to the UIlpoptions -l(keys likeEPIJ_Qual,cupsPrintQuality,Quality,CNIJQuality,StpQuality,OutputMode,Resolution) and/or PPD*OpenUIentriespaperSizeand quality through capturedcupsOptionswhen opening printer propertiesImplementation notes
workflow.pageSize: it seeds frompageSizeand re-seeds on pageSize change or capabilities reload, but remains user-editable otherwisecustomPageW/customPageH) maps to a customPageSizeentry: the PPD tokenCustom.WIDTHxHEIGHTis a template — emitCustom.<w>x<h>in points (mm × 72/25.4); synthetic picker entryid: 0, labelCustom (W×H mm)lpoptions -p <queue> -land PPD parsingPrinterCapabilities.paperSizesarray is already populated but unused by Stage 2 UI (docs/10 §PrinterPaperSize gap)PMPageFormatpaper size andPMPrintSettingsquality beforerunModalCupsOptionsFilter.relevantKeys(Packages/ICCeryCore/Sources/ICCeryCore/Print/CupsOptionsFilter.swift:16-32).CupsParsersholdsmediaTypeKeys,bypassKeys,detectMediaTypeKey,detectDriverColorBypassonly (CupsParsers.swift:217-263) — a new quality-key roster/detector is needed. IncludeEPIJ_Qual(see issue #180)Rewrite invariants
$PATHfor binaries (use/usr/bin/lpoptionsvia CupsService).tmp+ rename (#213)Textonly (#114)ARGYLL_NOT_INTERACTIVE=1on every spawn@MainActorDependencies
showPropertiesinitial-selections plumbing for paper size + quality only; #186 completes media type + orientation preselect, capture-return of all fields, and binding verificationTest
lpoptions -loutput with multiple paper sizes and quality options; verify UI populates pickers; verifyPrintOptionscarries values tobuild_lp_argsAcceptance criteria
pageSizeand re-mirroring on pageSize change / caps reload, editable otherwise)PrintOptionswhen printingCustom.<w>x<h>in points)Planning errata for the implementation contract (verified on develop@736fd08 — code is ground truth):
CupsParsers.relevantKeys" — the roster isCupsOptionsFilter.relevantKeys(Packages/ICCeryCore/Sources/ICCeryCore/Print/CupsOptionsFilter.swift:16–32).CupsParsersholdsmediaTypeKeys,bypassKeys,detectMediaTypeKey,detectDriverColorBypassonly (CupsParsers.swift:217–263).PrintOptions.paper_size— the Swift field ispaperSize(camelCase, PrinterModels.swift:100);paper_sizeis docs/10 spec naming.showPropertiesinitial-selections plumbing for those two. #186 completes media type + orientation preselect, capture-return of all fields, and binding verification.workflow.pageSizeon pageSize change or caps reload.Custom.WIDTHxHEIGHTis a template — emitCustom.<w>x<h>in points (mm × 72/25.4); synthetic picker entryid: 0, labelCustom (W×H mm).Errata above incorporated into the issue body — the ticket itself is now the corrected contract.