mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-01 02:35:37 +01:00
- Document.fullName is a File for the document's file, and Document.path a Folder for its folder. A document without a file has a fullName of a File for its name in Folder.current and a path of "". Both throw `Script file access denied` with the document's name when the automation read roots do not allow the file. - Document.saved reads whether the document has unsaved changes. Setting it runs the new command document.setSaved, which records the document as saved or as changed without saving it and adds no undo step. - Document.close(saveOptions) closes a document without unsaved changes with any SaveOptions value. With unsaved changes, SaveOptions.DONOTSAVECHANGES closes it without them, and SaveOptions.SAVECHANGES saves them first with file.saveAs, in the format the file's extension names and after the write-access check saveAs makes, and throws for a document without a file (a converted or recovered one included). SaveOptions.PROMPTTOSAVECHANGES, the default, throws, since a script cannot show the prompt. - The script checker reports SaveOptions.SAVECHANGES under filesWritten wherever the script reads it. - A pDFPreset in square brackets, such as [Smallest File Size], names the built-in preset of the name inside them. - artboardRange takes a whole number from 1 as well as a string; any other number throws. - With saveMultipleArtboards true, a .ai or EPS save also writes each artboard of the range to a file of its own. Without it the range is not used, but text that is not a range of artboard numbers throws. Document page: https://ai-scripting.docsforadobe.dev/jsobjref/Document/