mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-03 04:25:52 -05:00
On macOS and Linux the print job carried no media option, so the queue printed on its default paper whatever Size the Print dialog showed. The dialog now sends the driver's keyword for the chosen Size, and file.print takes it as `paper`; the job passes it to CUPS as `media`. A `paper` that is not a single keyword is an error, and so is `paper` with file output, with directPdf or on Windows, where the spooler does not apply it. While the chosen printer's sizes are still loading, Print is refused and the dialog stays open. A queue with no PPD on this machine (a driverless or remote printer) listed no paper sizes. Its sizes now come from `lpoptions -p NAME -l`, and when its server has no PPD either, from the queue's IPP media-supported attribute on the scheduler CUPS uses. CUPS's B4 and B5 keywords are the JIS sizes, and ISOB4 and ISOB5 the ISO ones. Builds on the printer paper lookup in apps/vectorcraft/src/printing.rs (#10511).