- The text attribute test has rows one step past the bounds of
baselineShift, horizontalScale, verticalScale and rotation.
- A new print test prints each PrintOptions group (overprints, page
marks, orientation, separations, custom and transverse paper, emulsion,
negative and position) through Document.print and compares the
PostScript with what file.print writes for the matching settings,
leaving out the CreationDate comment. Each case also checks that its
settings change the file. The color intent is compared in PDF, by the
art the printed file opens as.
- A new include test reads a refused absolute path whose URI-decoded form
is not read either, and checks that $.evalFile keeps the refusal.
file.print with maxPages flattened every raster effect in the document
before it counted the pages, so a job it then turned away still paid
for rendering each effect. The page count from the artboards now runs
first, on the artboards alone, and raster effects are flattened only
for a job that fits.
Follows up on #9087.
A script that set PrintColorManagementOptions.colorProfileMode to
CUSTOMPROFILE and assigned no name printed with the base settings'
profile, as though no custom profile had been asked for. The job now
throws before anything is written, as it does for an empty name.
Follows up on #9087.
- The print option classes list their members in reflect as #9060
lists them; the rule that left out unmapped options came from an
earlier merge of main and is not part of this change.
- Document.tags keeps its place after print in the Document members,
as on main.
- An option that is not mapped accepts only its exact default, so
`bitmapResolution = 0.0000000005` throws that it is not available.
- Paper `width` and `height` take 0 or 72 to 14,400 pt, checked when they
are assigned, as `file.print` requires for a custom size.
- An assigned `position` places an untiled job when the base settings hold
a placed Print Tiling origin. The saved settings keep the origin.
- The `app.open` size limit in docs/mcp.md is the 128 MiB a script command
reads, with the 256 MiB error above that.
- The backslash file name test asserts the result of each platform, and
the printArea test checks that the page is artboard 2.
- The 1000% scale limit applies only when Fit to Page is off, since the
scale factors are not used with it on.
- A script run clears the print command allowance when it ends, so a
panic inside print cannot leave file.print open to later runs.
- saveAs without options takes the format from the path the script
names, so a link at that path cannot change it.
- A File the host gives back charges its path to the heap.
- DocumentPreset.typename throws for a preset from an earlier run.
- Documents.addDocumentNoUI throws that it is not available yet.
- The print tests remove their folders when an assertion fails.
A save job now takes its path naming from whether the plan was given a
path, so a refused multi-file save without a path names its files by
their file names for every caller of `save_job`, as `document.save`
already did. Merging the save, export and open branch had left the job
naming full paths unless `save` set the field, which failed
`refused_multi_file_save_never_calls_the_writer`.
A multi-file save or export into a folder that may not be read no
longer fails with "automation path rejected: cannot resolve": a path
whose real path cannot be found is compared as written, and its write
reports READ_ONLY_LOCATION as other saves there do.
The print tests remove their folders when an assertion fails, and Check
Script has a test for printing the document `app['open']` returns.
Takes the script File design with native slots, Document.fullName,
path, saved and close, and Check Script's reading of bracketed document
chains. PrintJobOptions.bitmapResolution stays mapped to
advanced.bitmapResolution, and the print option classes keep main's
reflect rules for unmapped properties.
A multi-file save whose destination fails the access check now returns
that error without calling the writer. app.open refuses a document
larger than 256 MiB, checked from the file's size and again while the
file is read. On Windows, print and exportFile read the format from the
file name with trailing dots and spaces removed, as saveAs does. The
script checker reports app.open and app['open'] as file reads.
- An assigned empty artboardRange prints every artboard instead of the saved range.
- Save and export refuse two destinations that resolve to the same file.
- Script file paths that are not valid UTF-8 are refused.
- PrintJobOptions.file keeps the assigned File, so a later name change is printed to.
- app.open of a template link opens an untitled copy.
- CUSTOMPROFILE with no profile assigned or saved is refused before printing.
- A destination named .ps writes PostScript.
- The save description limits its no-write guarantee to failures found before writing.
Document.print opens the fence for file.print and closes it after the
command returns. A panic in that command skipped the close, so a later
run in the same session could call vc.run('file.print'). The end of
each run slice now clears the marker together with script_in_run.
- PrintJobOptions.file reads back as a File that can be assigned again.
- Document.saveAs picks the format from the supplied name before following
a link, trims the trailing dots and spaces Windows ignores, and keeps the
.ai, .eps and .pdf rule for a name that is only a dot and an extension.
- A save or export that writes several files refuses a target that is not
a regular file before any file is written, with the usual path redaction.
- Document.saveAs, Document.exportFile and app.open send command warnings
to the Script Console.
- fitToPage = false keeps a base tiling mode and clears only a base fit.
- The print scale factors take 1 to 1000 at assignment.
- File and Folder keep their state in native slots, so an object made from
File.prototype with a path property is refused as before, and logging,
localize() and toSource() still read their own properties.
- bitmapResolution declares a finite maximum, so its reflection matches.
- The two new script file messages are English only.
A PrintPostScriptOptions object reads postScriptLevel as PSLEVEL2, its
help page's default, but a job written to a .ps file without that
property assigned sent no level to file.print, which wrote level 3.
Document.print now sends level 2 for every PostScript job unless
PSLEVEL3 is assigned.
The print test checks the %%LanguageLevel comment of an unassigned .ps
job (2) and of a job with PSLEVEL3 assigned (3). docs/mcp.md and the
module notes state the default.
- Document.print to a printer no longer counts pages with print.preview,
which leaves out artboard backgrounds and placed files. It passes
file.print a new maxPages param: file.print counts the pages of the art
it prints and composes nothing when the job has more, answering
{pages, format}. An artboard that holds only its background now prints
with skipBlank, and a job turned away by the sheet limit is not
composed. When the pages follow from the artboards alone, the count is
checked before Print as Bitmap or a flattener preset prepares the art,
after the level and the flattener preset are checked.
- The printers a run lists keep the system's default printer when it
comes after the first 256 (it takes the last place), and a repeated
name keeps a later default mark without a second entry.
- The script checker reads app['open'](f) as giving a document, as
app.open(f) does, so a print of the variable that holds it counts as a
file write.
- The print job test checks the artwork in each prepared job, not only
that the two jobs differ.
Docs: docs/mcp.md (maxPages, the page count, the default printer),
docs/roadmap.md M13 row.
advanced.bitmapResolution sets the resolution Print as Bitmap renders a
composite page at, in a print-ready PDF and in PostScript. 0, the
default, keeps the document's raster effects resolution; 1 to 9600 ppi
is VectorCraft's own range, and print.setup, print.preview and
file.print refuse any other value. Given in file.print's settings it
applies to that job only; print.setup saves it with the document. The
Print dialog's Advanced section sets it under Resolution.
When the pixel limits (64 million pixels, 32,768 a side) keep a page's
image below the requested resolution, file.print and print.preview
warn with the resolution it prints at. A page that prints no image
gets no warning.
A script's PrintJobOptions.bitmapResolution now maps to it instead of
throwing.
- The host name check lists Document.print as a file write, and app's
print lists, PrintOptions, its option classes and the printing
enumerations as names that stay inside the run.
- The script checker reports a file write for print called on a
document: app.activeDocument, app.documents[i], documents.add(),
documents.getByName() and app.open(), or a variable that holds one.
A print method of any other object is not reported.
- An assigned artboardRange without printAllArtboards replaces the saved
range. An assigned printArea prints by artboard when the saved
settings, or the preset's, ignore the artboards: the assigned range,
or each artboard.
- The two scale factors are linked only when they are equal, as
file.print compares them.
- The format follows the name jobOptions.file gives, also when that
name is a link to a file with another extension.
- A print option name with a control character at either end throws.
Document.print without jobOptions.file now prints to the printer that
PrintOptions.printerName names, or to the default printer. A run started
in the app gets a bounded list of the print service's printer names
(at most 256, names up to 512 bytes, no control characters), and
app.printerList gives a Printer object for each. A name must match a
listed printer exactly.
print composes each job as a print-ready PDF and holds it until the
run ends. When the run's changes are kept, a dialog lists each job's
document, printer and pages, and only the person at the keyboard can
choose Print: ui.dialog.confirm and synthetic input are refused. Cancel
drops the jobs. A failed or stopped run sends nothing, and no job is
sent if one of its printers is no longer installed. A run prepares at
most 4 jobs, 100 pages and 32 MiB, and pages are counted before a job
is composed. The web, MCP and the command line cannot print to a
printer from a script.
Docs: docs/mcp.md, docs/target-app-parity.md.
Document.print(options) writes the file jobOptions.file names, checked as
saveAs checks its file: PostScript when the name ends with .ps or
postScriptLevel is assigned, a print-ready PDF otherwise. Only the
properties a script assigns are sent to file.print over the document's
saved print settings, which stay as they are, and no undo step is added.
Without a file it throws, since printing to a printer is not available
to scripts yet.
- new PrintOptions() and its nine option classes read as their help
pages' defaults until assigned, and a PrintOptions holds its option
objects by reference. Each value is checked when it is assigned.
- Preset, profile and paper names must name an existing preset, an RGB
or CMYK profile or a known paper; an empty name or one holding a path
separator or control character throws. An artboardRange naming a
missing artboard throws before anything is written.
- Options and values that are not mapped throw an error that says they
are not available yet. printerName and PPDName take only "".
- app.printPresetsList lists the print presets, app.PPDFileList is
empty, and the print enumerations are published.
- Each warning file.print gives goes to the Script Console.
- vc.run still cannot run file.print or print.*.
- A hosted File given to or returned by a member stays a File.
Help pages: https://ai-scripting.docsforadobe.dev/jsobjref/PrintOptions/
and the option class pages beside it.