Learning in public — this reference is being written in the open. Unfinished pages are excluded from search engines.
paged.IDML Reference
Scripting (paged.*)

Host functions

Every paged.* host function available to scripts, grouped by kind — generated directly from the engine's scripting catalog.

Tier: ProProIIIreference

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

FunctionReturnsSummary
paged.get(id, path)value | nullRead one property value of the addressed element. Try it ▸
paged.inspect(id)ElementProperties JSONFull property snapshot for one element (or storyRange). Try it ▸
paged.tree()SceneTreeNode[] JSONDocument hierarchy: spreads → pages → frames. Try it ▸
paged.pages()PageSummary[] JSONPages 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[] JSONLoaded stories with selfId + characterCount + paragraphCount. The source of valid story ids. Try it ▸
paged.layers()LayerSummary[] JSONDocument layers. Try it ▸
paged.swatches()SwatchSummary[] JSONColour palette (selfId/name/kind). Try it ▸
paged.paragraphStyles()ParagraphStyleSummary[] JSONParagraph styles — the source of valid styleRefs for applyStyle. Try it ▸
paged.characterStyles()CharacterStyleSummary[] JSONCharacter styles. Try it ▸
paged.objectStyles()ObjectStyleSummary[] JSONObject styles. Try it ▸
paged.gradients()GradientSummary[] JSONGradients. Try it ▸
paged.colorGroups()ColorGroupSummary[] JSONColour groups. Try it ▸
paged.links()LinkSummary[] JSONPlaced-asset links. Try it ▸
paged.conditions()ConditionSummary[] JSONConditional-text conditions. Try it ▸
paged.conditionSets()ConditionSetSummary[] JSONCondition sets. Try it ▸
paged.collection(name)Summary[] JSONGeneric typed-collection read by name; unknown name → "[]" + warning. Try it ▸
paged.documentMeta()DocumentMeta JSONDocument metadata (name/creator/modified/page count). Try it ▸
paged.selection()ElementId[] JSONCurrent element selection. Try it ▸
paged.contentSelection()ContentSelection JSON | nullCurrent text caret / range. Try it ▸

Write

FunctionReturnsSummary
paged.set(id, path, value)boolSet a property (see settablePaths) on the addressed element. null clears. Try it ▸
paged.resizePage(pageId, [t,l,b,r])boolSet a page's GeometricBounds in page-inner points. Try it ▸
paged.applyMasterToPage(pageId, masterId?)boolApply a master to a page (omit/null detaches). Try it ▸
paged.moveFrame(frameId, [a,b,c,d,tx,ty])boolSet a frame's affine placement transform. Try it ▸
paged.resizeFrame(frameId, [t,l,b,r])boolSet a frame's content-box bounds (re-paginating resize). Try it ▸
paged.pathPointCurveType(elemId, index, smooth)boolToggle an anchor between corner and smooth. Try it ▸
paged.pathPointSet(elemId, index, role, [x,y])boolWrite one Bezier handle (role = anchor|left|right). Try it ▸
paged.pathOpenAt(elemId, index)boolCut the path at the anchor at flat index. Try it ▸
paged.outlineStroke(elemId, width, cap, join, miter)boolReplace the path with its stroke-expansion outline. Try it ▸
paged.offsetPath(elemId, delta, join, miter)boolInset (delta<0) / outset (delta>0) a single closed contour. Try it ▸
paged.simplifyPath(elemId, tolerance)boolRe-express the path with fewer anchors within tolerance pt. Try it ▸
paged.setFieldValue(storyId, offset, value?)boolUpdate a placeholder field's cached display value (null ⇒ unresolved). Try it ▸
paged.replaceImageBytes(frameId, bytes?)boolCommit inline image bytes (number[] of u8) on a graphic frame; null clears. Try it ▸
paged.setRowHeight(storyId, tableId, row, height?)boolSet/clear a table row height in pt. Try it ▸
paged.setColumnWidth(storyId, tableId, col, width?)boolSet/clear a table column width in pt. Try it ▸
paged.setCellSpan(storyId, tableId, row, col, rowSpan, columnSpan)boolSet a cell's row/column span. Try it ▸
paged.renameParagraphStyle(styleId, name)boolRename a paragraph style. Try it ▸
paged.renameCharacterStyle(styleId, name)boolRename a character style. Try it ▸
paged.renameObjectStyle(styleId, name)boolRename an object style. Try it ▸
paged.renameCellStyle(styleId, name)boolRename a cell style. Try it ▸
paged.renameTableStyle(styleId, name)boolRename a table style. Try it ▸
paged.setStyleProperty(collection, styleId, path, value)boolSet one property on a style definition (collection = paragraph|character|object|cell|table; path = a settablePaths name). Try it ▸
paged.editNumberingList(listId, spec)boolEdit a <NumberingList>. Try it ▸
paged.editSection(sectionId, {prefix?,style?,start?})boolEdit a <Section>; prefix/start are tri-state (omit ⇒ leave, null ⇒ clear). Try it ▸
paged.setConditionVisible(conditionId, visible)boolFlip a condition's visibility. Try it ▸
paged.activateConditionSet(setId)boolActivate one <ConditionSet> ("show only this set"). Try it ▸
paged.layerMove(layerId, newIndex)boolReorder a layer to a new zero-based index. Try it ▸
paged.moveGuide(guideId, position)boolMove a guide along its perpendicular axis. Try it ▸
paged.setDocumentDefaults({fill?,stroke?,weight?})boolSet the new-object fill/stroke/weight defaults (whole-triple). Try it ▸
paged.setColorSettings({cmykProfileName?,rgbPolicy?,intent?,bpc?})boolReplace the document colour-management settings. Try it ▸
paged.setProofSetup({profileName?,simulatePaperWhite?,intent?})boolSoft-proofing configuration (profileName null turns proofing off). Try it ▸
paged.setInkSetting(spotId, {convertToProcess?,aliasTo?})boolReplace one ink's output-time settings. Try it ▸
paged.setUseStandardLabForSpots(enabled)boolPrefer spots' Lab primary over their CMYK alternate in previews. Try it ▸
paged.setPluginMetadata(elemId, key, value?, caller?)boolWrite one Label key/value pair on a leaf page item (value null deletes). Try it ▸
paged.setElementSelection([id, ...])boolReplace the element selection with the parseable ids. Try it ▸
paged.clearSelection()boolClear the element selection. Try it ▸
paged.setContentSelection({storyId,start,end} | null)boolSet or clear the text caret/range. Try it ▸

Author (structural)

FunctionReturnsSummary
paged.insertText(storyId, offset, text)boolInsert plain text at a story body offset; \n splits paragraphs. Try it ▸
paged.deleteRange(storyId, start, end)boolDelete the [start, end) character range of a story. Try it ▸
paged.insertTextFrame(pageId, [t,l,b,r])string (created id) | nullCreate 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) | nullCreate 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) | nullAppend 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?)boolPlace an image into a frame; fit is an optional fitting mode. Try it ▸
paged.applyStyle(storyId, start, end, styleRef)boolApply a paragraph/character style to a story range. Scope inferred from the ref prefix (CharacterStyle/… else Paragraph). Try it ▸
paged.createGroup([id, ...])boolGroup two-or-more elements; <2 valid members returns false. Try it ▸
paged.deletePage(pageId)boolDelete a page. Try it ▸
paged.duplicatePage(pageId)string | nullDuplicate a single-page spread after the source; returns the new page selfId. Try it ▸
paged.deleteElement(id)boolDelete a page item (kind:id address or bare self id). Try it ▸
paged.dissolveGroup(groupId)boolUngroup; members return to the group's paint slot. Try it ▸
paged.linkFrames(fromId, toId)boolThread fromId's overflow into the empty frame toId. Try it ▸
paged.unlinkFrames(frameId)boolBreak the text thread leaving a frame. Try it ▸
paged.insertLine(pageId, [x1,y1], [x2,y2])string | nullInsert a two-anchor open GraphicLine. Try it ▸
paged.insertOval(pageId, [t,l,b,r])string | nullInsert an Oval. Try it ▸
paged.insertPath(pageId, anchors, open, smooth?)string | nullInsert an arbitrary path; anchors = [{anchor:[x,y],left:[x,y],right:[x,y]}, …]. Try it ▸
paged.pathPointInsert(elemId, index, anchor, subpathStarts?)boolInsert an anchor into a path's flat PathPointArray at index. Try it ▸
paged.pathPointRemove(elemId, index)boolRemove the anchor at flat index. Try it ▸
paged.pathfinderBoolean(keptId, [otherIds], kind)boolPathfinder boolean (kind = union|intersect|subtract|exclude). Try it ▸
paged.insertField(storyId, offset, fieldKind)boolInsert a field marker; fieldKind = "pageNumber" | "nextPageNumber" | { placeholder: { plugin, key, value? } }. Try it ▸
paged.insertTable(storyId, spec)string | nullCreate 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)boolInsert an empty body row at index. Try it ▸
paged.deleteTableRow(storyId, tableId, at)boolDelete the body row at index. Try it ▸
paged.insertTableColumn(storyId, tableId, at)boolInsert an empty column at index. Try it ▸
paged.deleteTableColumn(storyId, tableId, at)boolDelete the column at index. Try it ▸
paged.insertHeaderRow(storyId, tableId)boolInsert a header-band row. Try it ▸
paged.removeHeaderRow(storyId, tableId)boolRemove the first header row. Try it ▸
paged.insertFooterRow(storyId, tableId)boolInsert a footer-band row. Try it ▸
paged.removeFooterRow(storyId, tableId)boolRemove the last footer row. Try it ▸
paged.createParagraphStyle({id?,name?,basedOn?})string | nullCreate a paragraph style; returns its selfId. Try it ▸
paged.deleteParagraphStyle(styleId)boolDelete a paragraph style. Try it ▸
paged.createCharacterStyle({id?,name?,basedOn?})string | nullCreate a character style; returns its selfId. Try it ▸
paged.deleteCharacterStyle(styleId)boolDelete a character style. Try it ▸
paged.createObjectStyle({id?,name?,basedOn?})string | nullCreate an object style; returns its selfId. Try it ▸
paged.deleteObjectStyle(styleId)boolDelete an object style. Try it ▸
paged.createCellStyle({id?,name?,basedOn?})string | nullCreate a cell style; returns its selfId. Try it ▸
paged.deleteCellStyle(styleId)boolDelete a cell style. Try it ▸
paged.createTableStyle({id?,name?,basedOn?})string | nullCreate a table style; returns its selfId. Try it ▸
paged.deleteTableStyle(styleId)boolDelete a table style. Try it ▸
paged.createNumberingList(spec)string | nullCreate a <NumberingList>; returns its id. Try it ▸
paged.deleteNumberingList(listId)boolDelete a <NumberingList>. Try it ▸
paged.insertSection(pageId, {prefix?,style?,start?})boolAnchor a <Section> at a page. Try it ▸
paged.deleteSection(sectionId)boolDelete a <Section>. Try it ▸
paged.layerInsert(position, name)boolAppend a layer at the zero-based stacking index. Try it ▸
paged.layerRemove(layerId)boolRemove a layer. Try it ▸
paged.insertGuide(spreadId, orientation, position, pageIndex?)boolInsert a ruler guide (orientation = vertical|horizontal). Try it ▸
paged.deleteGuide(guideId)boolDelete a guide. Try it ▸
paged.importSwatchLibrary(bytes, groupName?)boolImport an .ase swatch library (bytes = number[]) as one undoable op. Try it ▸
paged.batch([mutations])boolApply an array of { op, args } mutation objects as ONE undoable step. Try it ▸

History (undo/redo)

FunctionReturnsSummary
paged.undo()boolUndo the last mutation. Try it ▸
paged.redo()boolRedo the last undone mutation. Try it ▸

Console

FunctionReturnsSummary
console.log(...)undefinedAppend a line to the captured output log (also warn/error/info).