preview_batch
Dry-run a batch of InDesign commands against the cached document model to validate them before execution. Use after scanning to preview changes without writing to InDesign.
Instructions
Dry-run a batch against the cached Document Model (no InDesign writes). Call after scan_document. Prefer preview_batch before a large execute_batch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commands | Yes | Batch commands (prefer ONE execute_batch over many tools). Ops: checkpoint, move, resize, delete, duplicate, createTextFrame, setText, replaceText, setFont, setFill, align, distribute, center, stack, applyMargins, applyStyle, createStyle, updateStyle, relinkAsset, replaceAsset, embedAsset. checkpoint: {op:'checkpoint', tag?, keep?} saves an .indd copy to _checkpoints/ and runs before the undo transaction. createTextFrame: {op, x,y,width,height,text?} or {op, below:{role|uuid|selection}, gapPt?, text?}. Geometry in points. Requires prior scan_document (and analyze_page for role targets). |