M4.44: PDF presets: built-ins in code, saved presets, Edit > PDF Presets

Built-in presets are generated in code (VectorCraft Default, High
Quality Print, Press Quality, Smallest File Size and PDF/X-1a, X-3,
X-4, the latter listed as not supported yet) and read-only. Saved
presets live with the preferences (Prefs.pdf_presets) and work as
`preset` wherever PDF options are taken: document.exportPdf,
pdfSettings, export/serialize as PDF and .ai saves.

pdf.preset.list / save / delete / export / import manage them
(.vcpdfpresets files; opening one imports it). The Save PDF dialog's
Save Preset… saves its settings under a name; Edit > PDF Presets…
(ui.pdfPresetsDialog) lists the presets with each one's description and
differences from the default, with New…, Edit… (the Save PDF dialog as
a preset editor, ui.pdfPresetDialog), Delete, Import… and Export….
document.pdfSettings now lists what differs from the chosen preset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-05 10:40:22 +07:00
co-authored by Claude Opus 5.5
parent 0ffaa427d1
commit 9aa29aa0fd
20 changed files with 1028 additions and 42 deletions
+2
View File
@@ -40,6 +40,7 @@ mod panelcmds;
mod path;
mod pathops;
mod patterncmds;
pub mod pdfcmds;
mod place;
pub mod prefscmds;
pub mod rasterfx;
@@ -220,6 +221,7 @@ pub fn command_specs() -> &'static [CommandSpec] {
v.extend(newdoc::specs());
v.extend(place::specs());
v.extend(links::specs());
v.extend(pdfcmds::specs());
v
})
}