Learning in public — this reference is being written in the open. Unfinished pages are excluded from search engines.
paged.IDML Reference
Anchored & inline objects

Anchored objects

The element model of an anchored object — a frame nested inside a CharacterStyleRange, plus every attribute of its AnchoredObjectSetting and our parser's support status.

Tier: ProProIIIreference

An anchored object is a <Rectangle>, <TextFrame>, or <Group> written as a child of a CharacterStyleRange, carrying one <AnchoredObjectSetting>.

In short An anchored object is built from two parts in IDML. The first is an ordinary frame element — a <Rectangle>, a <TextFrame>, or a <Group>, the same elements you would find on a spread — but written inside a run of text rather than on the spread. The second is a single extra child, <AnchoredObjectSetting>, that records where the frame should land relative to the anchor character. Our parser reads the frame's geometry and styling onto the host paragraph and reads the setting alongside it. This page is the reference for both: the frame element's attributes and every attribute of <AnchoredObjectSetting>, each with its honest support status.

An anchored object is a frame written as a child of a CharacterStyleRange. The frame is one of three familiar elements — a <Rectangle>, a <TextFrame>, or a <Group> — and it carries a single extra child, <AnchoredObjectSetting>, that describes where it should land relative to the anchor character. The parser reads the frame's geometry and styling onto the host paragraph and reads the setting alongside it.

A Rectangle nested inside a run, with an AnchoredObjectSetting. The renderer reports paragraphs: 1, runs: 1 — the anchored frame is read onto the paragraph, not counted as a spread item.

Stories/Story_ustory.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Story xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <Story Self="ustory">
    <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
      <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
        <Content>A paragraph that carries an anchored object.</Content>
        <Rectangle Self="uanchor" AppliedObjectStyle="ObjectStyle/$ID/[None]" ItemTransform="1 0 0 1 0 0" GeometricBounds="0 0 36 72" FillColor="Color/Black" StrokeColor="Swatch/None" StrokeWeight="0">
          <AnchoredObjectSetting AnchoredPosition="InlinePosition" SpineRelative="false" LockPosition="false" AnchorPoint="BottomLeftAnchor" AnchorXoffset="0" AnchorYoffset="0"/>
        </Rectangle>
      </CharacterStyleRange>
    </ParagraphStyleRange>
  </Story>
</idPkg:Story>

The frame element

Any of three elements may appear directly inside a CharacterStyleRange to become an anchored object. Which one it is, the parser records as a frame kind; the rest of the attributes it reads mirror how the same element is read at spread level.

Attribute · Rectangle / TextFrame / Group (nested in a CharacterStyleRange)Type / valuesSupportNotes
Selfstring idParsed, not renderedThe frame’s id. Recorded on the anchored-frame record.
GeometricBoundsstring "y1 x1 y2 x2" (pt)Parsed, not renderedThe frame’s box. Read here; an explicit GeometricBounds wins over bounds derived from a nested PathGeometry.
ItemTransformstring "a b c d e f" (matrix)Parsed, not renderedThe frame’s transform. For an anchored frame it positions content in the frame’s own coordinates, not on the spread.
ParentStorystring ref (Story/…)Parsed, not renderedTextFrame only — the story whose text fills the anchored frame. Absent for Rectangle and Group.
FillColorstring ref (Color/… or Swatch/None)Parsed, not renderedFill swatch. None ⇒ inherit from the applied object style cascade.
StrokeColorstring ref (Color/… or Swatch/None)Parsed, not renderedStroke swatch.
StrokeWeightdouble (pt)Parsed, not renderedStroke width.
FillTintdouble (0–100)Parsed, not renderedTint percentage of the fill.
GradientFillAngledouble (deg)Parsed, not renderedAngle of a gradient fill.
AppliedObjectStylestring ref (ObjectStyle/…)Parsed, not renderedThe object style applied to the frame.

A few things the parser deliberately does not recurse into on an anchored frame: nested transparency settings, and — beyond a nested <Image>'s link URI and transform on an anchored <Rectangle> — image styling. A <Group> records its child frames in z-order; a <TextFrame> records its ParentStory, and the renderer now chases that story content and places the frame at the anchor. What is not yet flowed is the inline advance reservation (an InlinePosition object does not push following text along) and text wrap around the object.

Parsed, not renderedplaced at the anchor (above/below + custom position); inline advance reservation and text-wrap around the object are the remaining flow integration — paged-parse/src/story.rs:264

AnchoredObjectSetting

The placement block. It sits inside the frame element and records intent — where the object should land relative to the anchor — without itself moving anything. The parser stores each attribute's value verbatim; an absent attribute falls back to the cascaded default.

Attribute · AnchoredObjectSettingType / valuesSupportNotes
AnchoredPositionInlinePosition | AboveLine | AnchoredParsed, not renderedThe placement mode. Absent ⇒ inline. See inline vs anchored positioning for what each mode means.
AnchorPointTopLeftAnchor | TopCenterAnchor | TopRightAnchor | LeftCenterAnchor | CenterAnchor | RightCenterAnchor | BottomLeftAnchor | BottomCenterAnchor | BottomRightAnchorParsed, not renderedWhich point of the object is pinned to the anchor.
AnchorXoffsetdouble (pt)Parsed, not renderedHorizontal nudge from the anchor point. 0 when absent.
AnchorYoffsetdouble (pt)Parsed, not renderedVertical nudge from the anchor point. 0 when absent.
SpineRelativebooleanParsed, not renderedtrue flips the offset direction on facing pages. false is the default.
LockPositionbooleanParsed, not renderedtrue pins the object so it can’t be dragged. false is the default.
HorizontalReferencePointAnchorLocation | ColumnEdge | TextFrame | PageMargins | PageEdgeParsed, not renderedFor custom positioning — which rectangle the horizontal alignment measures from. Absent ⇒ AnchorLocation.
HorizontalAlignmentLeftAlign | CenterAlign | RightAlign | TextAlignParsed, not renderedFor custom positioning — which side of the horizontal reference the object sits against.
VerticalReferencePointLineBaseline | LineXHeight | LineCapHeight | TopOfLeading | Column | TextFrame | PageMargins | PageEdgeParsed, not renderedFor custom positioning — which line or page feature the vertical alignment measures from.
VerticalAlignmentTopAlign | CenterAlign | BottomAlignParsed, not renderedFor custom positioning — vertical alignment against the vertical reference.

Why the count doesn't change

The example above adds a whole <Rectangle> to the story, yet the renderer still reports frames: 1, paragraphs: 1, runs: 1. That is the point of an anchored object being inside a run: it is recorded on the host paragraph, not promoted to a spread-level frame, so it does not inflate the frame count — and the run that hosts it is still one run. The frame on the spread (frames: 1) is the page's text frame; the anchored rectangle is data hanging off the paragraph within it.

Next

What AnchoredPosition, AnchorPoint, and the reference/alignment attributes actually do — and how much of it the renderer carries today — is the subject of inline vs anchored positioning.

Frequently asked questions

Which elements can be an anchored object? Exactly three: a <Rectangle>, a <TextFrame>, or a <Group>, written directly inside a CharacterStyleRange. These are the same elements you would find on a spread; the parser records which one it is as the frame's kind and reads the rest of its attributes the way it reads them at spread level.

What does <AnchoredObjectSetting> do? It is the placement block nested inside the frame element. It records intent — where the object should land relative to the anchor, via attributes like AnchoredPosition, AnchorPoint, and the offset and reference/alignment pairs — without itself moving anything. The parser stores each attribute verbatim, and an absent attribute falls back to its cascaded default.

Why doesn't adding an anchored object change the frame, paragraph, or run count? Because the object is recorded on its host paragraph rather than promoted to a spread-level frame. The frame count reflects the page's text frame, the paragraph still has one paragraph, and the run that hosts the object is still one run — so the renderer reports frames: 1, paragraphs: 1, runs: 1 even though a whole <Rectangle> was added to the story.

Does the parser read everything inside an anchored frame? No. It deliberately skips nested transparency settings and, beyond a nested <Image>'s link URI and transform on an anchored <Rectangle>, image styling. A <Group> records its child frames in z-order, and a <TextFrame> records its ParentStory so the renderer can chase the story content once placement lands.

On this page