Files
vectorcraft/crates/js
dotCooCoo e8a0aa6ba4 Scripts: documents give their file, folder and saved state, close, and save several artboards
- 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/
2026-11-23 19:01:40 -08:00
..