Scripting (paged.*)
Host functions
Every paged.* host function available to scripts, grouped by kind — generated directly from the engine's scripting catalog.
ProIIIreference
In short the complete paged.* host surface, grouped by what each function
does. Generated from the engine catalog — if the engine adds a function, it
appears here automatically.
109 of 109 host functions, grouped by kind.
Read
| Function | Returns | Summary |
|---|---|---|
| paged.get(id, path) | value | null | Read one property value of the addressed element. Try it ▸ |
| paged.inspect(id) | ElementProperties JSON | Full property snapshot for one element (or storyRange). Try it ▸ |
| paged.tree() | SceneTreeNode[] JSON | Document hierarchy: spreads → pages → frames. Try it ▸ |
| paged.pages() | PageSummary[] JSON | Pages with selfId + 1-based index + sizePt. selfId is the page id for insertFrame/insertTextFrame/insertPage (and the afterPageId of insertPage) — the only way a script can obtain a usable page id. Try it ▸ |
| paged.stories() | StorySummary[] JSON | Loaded stories with selfId + characterCount + paragraphCount. The source of valid story ids. Try it ▸ |
| paged.layers() | LayerSummary[] JSON | Document layers. Try it ▸ |
| paged.swatches() | SwatchSummary[] JSON | Colour palette (selfId/name/kind). Try it ▸ |
| paged.paragraphStyles() | ParagraphStyleSummary[] JSON | Paragraph styles — the source of valid styleRefs for applyStyle. Try it ▸ |
| paged.characterStyles() | CharacterStyleSummary[] JSON | Character styles. Try it ▸ |
| paged.objectStyles() | ObjectStyleSummary[] JSON | Object styles. Try it ▸ |
| paged.gradients() | GradientSummary[] JSON | Gradients. Try it ▸ |
| paged.colorGroups() | ColorGroupSummary[] JSON | Colour groups. Try it ▸ |
| paged.links() | LinkSummary[] JSON | Placed-asset links. Try it ▸ |
| paged.conditions() | ConditionSummary[] JSON | Conditional-text conditions. Try it ▸ |
| paged.conditionSets() | ConditionSetSummary[] JSON | Condition sets. Try it ▸ |
| paged.collection(name) | Summary[] JSON | Generic typed-collection read by name; unknown name → "[]" + warning. Try it ▸ |
| paged.documentMeta() | DocumentMeta JSON | Document metadata (name/creator/modified/page count). Try it ▸ |
| paged.selection() | ElementId[] JSON | Current element selection. Try it ▸ |
| paged.contentSelection() | ContentSelection JSON | null | Current text caret / range. Try it ▸ |
Write
| Function | Returns | Summary |
|---|---|---|
| paged.set(id, path, value) | bool | Set a property (see settablePaths) on the addressed element. null clears. Try it ▸ |
| paged.resizePage(pageId, [t,l,b,r]) | bool | Set a page's GeometricBounds in page-inner points. Try it ▸ |
| paged.applyMasterToPage(pageId, masterId?) | bool | Apply a master to a page (omit/null detaches). Try it ▸ |
| paged.moveFrame(frameId, [a,b,c,d,tx,ty]) | bool | Set a frame's affine placement transform. Try it ▸ |
| paged.resizeFrame(frameId, [t,l,b,r]) | bool | Set a frame's content-box bounds (re-paginating resize). Try it ▸ |
| paged.pathPointCurveType(elemId, index, smooth) | bool | Toggle an anchor between corner and smooth. Try it ▸ |
| paged.pathPointSet(elemId, index, role, [x,y]) | bool | Write one Bezier handle (role = anchor|left|right). Try it ▸ |
| paged.pathOpenAt(elemId, index) | bool | Cut the path at the anchor at flat index. Try it ▸ |
| paged.outlineStroke(elemId, width, cap, join, miter) | bool | Replace the path with its stroke-expansion outline. Try it ▸ |
| paged.offsetPath(elemId, delta, join, miter) | bool | Inset (delta<0) / outset (delta>0) a single closed contour. Try it ▸ |
| paged.simplifyPath(elemId, tolerance) | bool | Re-express the path with fewer anchors within tolerance pt. Try it ▸ |
| paged.setFieldValue(storyId, offset, value?) | bool | Update a placeholder field's cached display value (null ⇒ unresolved). Try it ▸ |
| paged.replaceImageBytes(frameId, bytes?) | bool | Commit inline image bytes (number[] of u8) on a graphic frame; null clears. Try it ▸ |
| paged.setRowHeight(storyId, tableId, row, height?) | bool | Set/clear a table row height in pt. Try it ▸ |
| paged.setColumnWidth(storyId, tableId, col, width?) | bool | Set/clear a table column width in pt. Try it ▸ |
| paged.setCellSpan(storyId, tableId, row, col, rowSpan, columnSpan) | bool | Set a cell's row/column span. Try it ▸ |
| paged.renameParagraphStyle(styleId, name) | bool | Rename a paragraph style. Try it ▸ |
| paged.renameCharacterStyle(styleId, name) | bool | Rename a character style. Try it ▸ |
| paged.renameObjectStyle(styleId, name) | bool | Rename an object style. Try it ▸ |
| paged.renameCellStyle(styleId, name) | bool | Rename a cell style. Try it ▸ |
| paged.renameTableStyle(styleId, name) | bool | Rename a table style. Try it ▸ |
| paged.setStyleProperty(collection, styleId, path, value) | bool | Set one property on a style definition (collection = paragraph|character|object|cell|table; path = a settablePaths name). Try it ▸ |
| paged.editNumberingList(listId, spec) | bool | Edit a <NumberingList>. Try it ▸ |
| paged.editSection(sectionId, {prefix?,style?,start?}) | bool | Edit a <Section>; prefix/start are tri-state (omit ⇒ leave, null ⇒ clear). Try it ▸ |
| paged.setConditionVisible(conditionId, visible) | bool | Flip a condition's visibility. Try it ▸ |
| paged.activateConditionSet(setId) | bool | Activate one <ConditionSet> ("show only this set"). Try it ▸ |
| paged.layerMove(layerId, newIndex) | bool | Reorder a layer to a new zero-based index. Try it ▸ |
| paged.moveGuide(guideId, position) | bool | Move a guide along its perpendicular axis. Try it ▸ |
| paged.setDocumentDefaults({fill?,stroke?,weight?}) | bool | Set the new-object fill/stroke/weight defaults (whole-triple). Try it ▸ |
| paged.setColorSettings({cmykProfileName?,rgbPolicy?,intent?,bpc?}) | bool | Replace the document colour-management settings. Try it ▸ |
| paged.setProofSetup({profileName?,simulatePaperWhite?,intent?}) | bool | Soft-proofing configuration (profileName null turns proofing off). Try it ▸ |
| paged.setInkSetting(spotId, {convertToProcess?,aliasTo?}) | bool | Replace one ink's output-time settings. Try it ▸ |
| paged.setUseStandardLabForSpots(enabled) | bool | Prefer spots' Lab primary over their CMYK alternate in previews. Try it ▸ |
| paged.setPluginMetadata(elemId, key, value?, caller?) | bool | Write one Label key/value pair on a leaf page item (value null deletes). Try it ▸ |
| paged.setElementSelection([id, ...]) | bool | Replace the element selection with the parseable ids. Try it ▸ |
| paged.clearSelection() | bool | Clear the element selection. Try it ▸ |
| paged.setContentSelection({storyId,start,end} | null) | bool | Set or clear the text caret/range. Try it ▸ |
Author (structural)
| Function | Returns | Summary |
|---|---|---|
| paged.insertText(storyId, offset, text) | bool | Insert plain text at a story body offset; \n splits paragraphs. Try it ▸ |
| paged.deleteRange(storyId, start, end) | bool | Delete the [start, end) character range of a story. Try it ▸ |
| paged.insertTextFrame(pageId, [t,l,b,r]) | string (created id) | null | Create an empty text-pourable frame at page-local point bounds (mints a story) and select it. Returns the new textFrame:<id> address, or null on failure. Try it ▸ |
| paged.insertFrame(pageId, [t,l,b,r]) | string (created id) | null | Create an empty graphic (non-text) frame and select it; the usual placeImage target. Returns the new frame's kind:id address, or null. Try it ▸ |
| paged.insertPage(afterPageId?) | string (page selfId) | null | Append a page after afterPageId (or at the end), inheriting the default master. Returns the new page's selfId (reusable as the next afterPageId), or null. Try it ▸ |
| paged.placeImage(frameId, uri, fit?) | bool | Place an image into a frame; fit is an optional fitting mode. Try it ▸ |
| paged.applyStyle(storyId, start, end, styleRef) | bool | Apply a paragraph/character style to a story range. Scope inferred from the ref prefix (CharacterStyle/… else Paragraph). Try it ▸ |
| paged.createGroup([id, ...]) | bool | Group two-or-more elements; <2 valid members returns false. Try it ▸ |
| paged.deletePage(pageId) | bool | Delete a page. Try it ▸ |
| paged.duplicatePage(pageId) | string | null | Duplicate a single-page spread after the source; returns the new page selfId. Try it ▸ |
| paged.deleteElement(id) | bool | Delete a page item (kind:id address or bare self id). Try it ▸ |
| paged.dissolveGroup(groupId) | bool | Ungroup; members return to the group's paint slot. Try it ▸ |
| paged.linkFrames(fromId, toId) | bool | Thread fromId's overflow into the empty frame toId. Try it ▸ |
| paged.unlinkFrames(frameId) | bool | Break the text thread leaving a frame. Try it ▸ |
| paged.insertLine(pageId, [x1,y1], [x2,y2]) | string | null | Insert a two-anchor open GraphicLine. Try it ▸ |
| paged.insertOval(pageId, [t,l,b,r]) | string | null | Insert an Oval. Try it ▸ |
| paged.insertPath(pageId, anchors, open, smooth?) | string | null | Insert an arbitrary path; anchors = [{anchor:[x,y],left:[x,y],right:[x,y]}, …]. Try it ▸ |
| paged.pathPointInsert(elemId, index, anchor, subpathStarts?) | bool | Insert an anchor into a path's flat PathPointArray at index. Try it ▸ |
| paged.pathPointRemove(elemId, index) | bool | Remove the anchor at flat index. Try it ▸ |
| paged.pathfinderBoolean(keptId, [otherIds], kind) | bool | Pathfinder boolean (kind = union|intersect|subtract|exclude). Try it ▸ |
| paged.insertField(storyId, offset, fieldKind) | bool | Insert a field marker; fieldKind = "pageNumber" | "nextPageNumber" | { placeholder: { plugin, key, value? } }. Try it ▸ |
| paged.insertTable(storyId, spec) | string | null | Create a <Table> at the end of a story; spec = { rows, cols, headerRows?, footerRows?, columnWidths?, rowHeights? }. Returns the table id. Try it ▸ |
| paged.insertTableRow(storyId, tableId, at) | bool | Insert an empty body row at index. Try it ▸ |
| paged.deleteTableRow(storyId, tableId, at) | bool | Delete the body row at index. Try it ▸ |
| paged.insertTableColumn(storyId, tableId, at) | bool | Insert an empty column at index. Try it ▸ |
| paged.deleteTableColumn(storyId, tableId, at) | bool | Delete the column at index. Try it ▸ |
| paged.insertHeaderRow(storyId, tableId) | bool | Insert a header-band row. Try it ▸ |
| paged.removeHeaderRow(storyId, tableId) | bool | Remove the first header row. Try it ▸ |
| paged.insertFooterRow(storyId, tableId) | bool | Insert a footer-band row. Try it ▸ |
| paged.removeFooterRow(storyId, tableId) | bool | Remove the last footer row. Try it ▸ |
| paged.createParagraphStyle({id?,name?,basedOn?}) | string | null | Create a paragraph style; returns its selfId. Try it ▸ |
| paged.deleteParagraphStyle(styleId) | bool | Delete a paragraph style. Try it ▸ |
| paged.createCharacterStyle({id?,name?,basedOn?}) | string | null | Create a character style; returns its selfId. Try it ▸ |
| paged.deleteCharacterStyle(styleId) | bool | Delete a character style. Try it ▸ |
| paged.createObjectStyle({id?,name?,basedOn?}) | string | null | Create an object style; returns its selfId. Try it ▸ |
| paged.deleteObjectStyle(styleId) | bool | Delete an object style. Try it ▸ |
| paged.createCellStyle({id?,name?,basedOn?}) | string | null | Create a cell style; returns its selfId. Try it ▸ |
| paged.deleteCellStyle(styleId) | bool | Delete a cell style. Try it ▸ |
| paged.createTableStyle({id?,name?,basedOn?}) | string | null | Create a table style; returns its selfId. Try it ▸ |
| paged.deleteTableStyle(styleId) | bool | Delete a table style. Try it ▸ |
| paged.createNumberingList(spec) | string | null | Create a <NumberingList>; returns its id. Try it ▸ |
| paged.deleteNumberingList(listId) | bool | Delete a <NumberingList>. Try it ▸ |
| paged.insertSection(pageId, {prefix?,style?,start?}) | bool | Anchor a <Section> at a page. Try it ▸ |
| paged.deleteSection(sectionId) | bool | Delete a <Section>. Try it ▸ |
| paged.layerInsert(position, name) | bool | Append a layer at the zero-based stacking index. Try it ▸ |
| paged.layerRemove(layerId) | bool | Remove a layer. Try it ▸ |
| paged.insertGuide(spreadId, orientation, position, pageIndex?) | bool | Insert a ruler guide (orientation = vertical|horizontal). Try it ▸ |
| paged.deleteGuide(guideId) | bool | Delete a guide. Try it ▸ |
| paged.importSwatchLibrary(bytes, groupName?) | bool | Import an .ase swatch library (bytes = number[]) as one undoable op. Try it ▸ |
| paged.batch([mutations]) | bool | Apply an array of { op, args } mutation objects as ONE undoable step. Try it ▸ |
History (undo/redo)
Console
| Function | Returns | Summary |
|---|---|---|
| console.log(...) | undefined | Append a line to the captured output log (also warn/error/info). |
Examples
A working, editable playground for each paged.* host function — read the document, style frames, author text, apply styles, place images, and undo, each runnable against the real editor.
Settable paths & id grammar
The property paths accepted by paged.set, and the id grammar for addressing elements — generated from the engine's scripting catalog.