diff --git a/crates/engine/tests/it/script_host_vs_scriptcheck.rs b/crates/engine/tests/it/script_host_vs_scriptcheck.rs index 9a6b736535..5017714960 100644 --- a/crates/engine/tests/it/script_host_vs_scriptcheck.rs +++ b/crates/engine/tests/it/script_host_vs_scriptcheck.rs @@ -360,7 +360,7 @@ const INSIDE: &[(&str, &str)] = &[ ( "PrintOptions.prototype.", "PPDName PPDName= colorManagementOptions colorManagementOptions= colorSeparationOptions colorSeparationOptions= \ - constructor coordinateOptions coordinateOptions= flattenerOptions flattenerOptions= flattenerPreset \ + constructor coordinateOptions coordinateOptions= driverColor driverColor= driverDuplex driverDuplex= flattenerOptions flattenerOptions= flattenerPreset \ flattenerPreset= fontOptions fontOptions= jobOptions jobOptions= pageMarksOptions pageMarksOptions= paperOptions \ paperOptions= postScriptOptions postScriptOptions= printPreset printPreset= printerName printerName= typename", ), diff --git a/crates/ui-egui/src/dialogs/print.rs b/crates/ui-egui/src/dialogs/print.rs index 17a8c8ed88..6910cda8eb 100644 --- a/crates/ui-egui/src/dialogs/print.rs +++ b/crates/ui-egui/src/dialogs/print.rs @@ -63,7 +63,7 @@ static KEYS: LazyLock> = LazyLock::new(|| sections(&Lists::default()) const PLACED: &str = "tileOrigin.placed"; /// The fields that aren't print settings. -const NOT_SETTINGS: [&str; 1] = ["directPdf"]; +const NOT_SETTINGS: [&str; 3] = ["directPdf", "driverColor", "driverDuplex"]; /// The Printer list's entries besides the system's printers; `PDF_FILE` is the destination that /// saves the job as a PDF. diff --git a/crates/ui-egui/src/menus/ui_commands.rs b/crates/ui-egui/src/menus/ui_commands.rs index e131421a2a..5f22fc3c95 100644 --- a/crates/ui-egui/src/menus/ui_commands.rs +++ b/crates/ui-egui/src/menus/ui_commands.rs @@ -1992,7 +1992,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "file.print", "Print…", "Cmd+P", - "{} open the Print dialog (dialog `print`: the print.setup settings, preset (setting it loads that print preset; Save Preset… saves them as one), printer, toFile; on desktop, installed printers appear once the background lookup has returned and the dialog has applied the list; ui.dialog.set accepts a named printer once it appears in the list; PDF File is available at once; Print keeps the settings with the document and prints, Done (discard: true) only keeps them); with params {preset? (a print preset's name: its settings instead of the document's), settings? (over the document's or the preset's), printer? (print.printers name; \"\" the default), paper? (the printer driver's paper keyword, such as Letter or CR80: the queue is asked for that paper as the job's media on macOS and Linux; on Windows, with file output, with directPdf, or anything but a keyword it is an error; the Print dialog sends the driver's keyword for the Size chosen), toFile?, path?, format?: pdf|postscript, level?, flattenerPreset?, maxPages? (as engine file.print)} print without it: the print-ready PDF (engine file.print) goes to the printer → {pages, printer, printed: true, warnings}; with toFile, a path or no printing here (no print service) it is saved as a PDF at path (else a picked file, the web downloads it) → {path, pages, printed: false, warnings}; a PostScript file (format postscript, or a .ps path) is always saved that way; a job of more than maxPages pages is neither printed nor saved → {pages, format}", + "{} open the Print dialog (dialog `print`: the print.setup settings, preset (setting it loads that print preset; Save Preset… saves them as one), printer, toFile; on desktop, installed printers appear once the background lookup has returned and the dialog has applied the list; ui.dialog.set accepts a named printer once it appears in the list; PDF File is available at once; Print keeps the settings with the document and prints, Done (discard: true) only keeps them); with params {preset? (a print preset's name: its settings instead of the document's), settings? (over the document's or the preset's), printer? (print.printers name; \"\" the default), paper? (the printer driver's paper keyword, such as Letter or CR80: the queue is asked for that paper as the job's media on macOS and Linux; on Windows, with file output, with directPdf, or anything but a keyword it is an error; the Print dialog sends the driver's keyword for the Size chosen), driverOptions?: {color?: color|monochrome, duplex?: oneSided|longEdge|shortEdge} (per native-driver job; either omitted choice keeps the queue or Properties value), toFile?, path?, format?: pdf|postscript, level?, flattenerPreset?, maxPages? (as engine file.print)} print without it: the print-ready PDF (engine file.print) goes to the printer → {pages, printer, printed: true, warnings}; with toFile, a path or no printing here (no print service) it is saved as a PDF at path (else a picked file, the web downloads it) → {path, pages, printed: false, warnings}; a PostScript file (format postscript, or a .ps path) is always saved that way; a job of more than maxPages pages is neither printed nor saved → {pages, format}", ), ( "print.printers", diff --git a/docs/mcp.md b/docs/mcp.md index b3c7372984..6d3855eb2f 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3587,7 +3587,9 @@ through `$`: printer `printerName` names, or to the system's default printer when it is `""` or not assigned (https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/). The name must be exactly the name of a printer the app listed for the run, or `print` throws `PrintOptions.printerName names no installed printer`; with no default - printer it throws `There is no default printer`. `print` composes the job as a print-ready PDF when it is called + printer it throws `There is no default printer`. For a printer job, `driverColor` accepts + `default`, `color` and `monochrome`. `driverDuplex` accepts `default`, `oneSided`, `longEdge` + and `shortEdge`. The two choices apply only to that job. `print` composes the job as a print-ready PDF when it is called and sends nothing while the run goes on. When the run ends and its changes are kept, the app asks before it sends the jobs (dialog kind `scriptPrint`, listing each job's document, printer and pages). The dialog does not open while a text field or text being typed on the canvas has the keyboard; it opens once neither does. The jobs are @@ -13524,7 +13526,10 @@ its raster effects are rendered. In the app, `file.print` with no params opens t dialog, and with params it prints through the system (`printer`: a name from `print.printers`, default the system's default printer) or, with `toFile`, a `path` or no printing available, saves the PDF. `paper` names the printer driver's keyword for the paper (`Letter`, `CR80`, `iso_a4_210x297mm`), which the job asks the print queue for as its -`media` on macOS and Linux. `paper` is an error on Windows, with file output, with `directPdf`, or when the value is +`media` on macOS and Linux. `driverOptions.color` accepts `color` or `monochrome`, and +`driverOptions.duplex` accepts `oneSided`, `longEdge` or `shortEdge`. Omit either field to keep +the printer's choice. These per-job options require the desktop driver path. +`paper` is an error on Windows, with file output, with `directPdf`, or when the value is not such a keyword. The Print dialog sends the keyword of the Size chosen when the printer's driver lists that paper. A printer whose PPD is not on this machine (a driverless or remote queue), or any printer when `CUPS_SERVER` or `ServerName` names a scheduler other than a domain socket, `localhost`, `127.0.0.1` or `::1` (each with no port or port 631), lists the paper sizes `lpoptions -l` reports for it, and when its server has no PPD either, the sizes