paged.IDML Reference
Geometry & coordinates

ItemTransform

ItemTransform is the six-number affine matrix (a b c d tx ty) that maps an IDML element's inner space into its parent's space; InDesign writes it everywhere.

Tier: IntermediateIntermediateIIreference

ItemTransform is the six-number affine matrix that maps an element's inner space into its parent's space.

In short An item draws its outline in its own space, usually starting at 0, 0. ItemTransform maps that space into the item's parent: the spread, an enclosing Group, or the frame the item was pasted into. The value is six numbers, a b c d tx ty, the free entries of a 2D affine matrix: translation, scale, rotation and shear. 1 0 0 1 0 0 is the identity. InDesign writes an ItemTransform on every spread, page and page item, identity included, and does not treat a missing one as the identity.

The six numbers

The value is six numbers separated by spaces. Applied to a point (x, y) of the inner space, it gives the point in the parent space:

x' = a·x + c·y + tx
y' = b·x + d·y + ty
EntryRole
a, dhorizontal and vertical scale (and part of any rotation)
b, cshear; together with a and d they express rotation
tx, tytranslation in points; a positive ty moves down, because Y grows downward

A rotation by θ is cos θ sin θ -sin θ cos θ tx ty. A horizontal flip is a negative a.

Where it appears

ElementMapsNotes
Spread, MasterSpreadthe spread onto the pasteboardInDesign uses the translation to stack spreads down the pasteboard; it cancels out per page. A rotation turns the whole spread.
Pagethe page's GeometricBounds into spread spaceputs the left page of a facing spread at negative x; see units & origin
page items: TextFrame, Rectangle, Oval, GraphicLine, Polygon, Groupthe item into its parentthe parent is the spread, a Group, or a host frame
Image, EPS, PDF inside a framethe placed content into the framehow an image is scaled, moved and cropped inside its frame
Page · MasterPageTransformthe applied master page onto this pagesame six numbers; see master items and stamping

A page item is never a child of a <Page>, so a page is never an item's parent space.

Transforms compose

A parent's transform applies on top of its children's. A rectangle inside a group inside a spread reaches spread space as group ∘ rectangle: first the rectangle's own matrix, then the group's. Nesting composes at every level, so a member two groups deep is outer ∘ inner ∘ member.

The same holds for content pasted into a frame (Paste Into in InDesign). The pasted item is written as a child element of the host Rectangle, Oval or Polygon, its ItemTransform is relative to the host, and the host's path clips it. A placed image is the common case: the frame's transform places the frame, the <Image> transform places the picture inside it.

Two rectangles in a group. Each member's ItemTransform is relative to the group; the group's ItemTransform moves both.

Spreads/Spread_uspread.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Spread xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <Spread Self="uspread" PageCount="1" BindingLocation="0" ShowMasterItems="true" AllowPageShuffle="true" ItemTransform="1 0 0 1 0 0">
    <Page Self="upage" Name="1" AppliedMaster="umaster" ItemTransform="1 0 0 1 0 0" GeometricBounds="0 0 841.89 595.276" MasterPageTransform="1 0 0 1 0 0"/>
    <Group Self="ugroup" ItemTransform="1 0 0 1 100 120" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/">
      <Rectangle Self="urect1" ContentType="GraphicType" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 0 0" FillColor="Color/Red" StrokeColor="Swatch/None" StrokeWeight="0">
        <Properties>
          <PathGeometry>
            <GeometryPathType PathOpen="false">
              <PathPointArray>
                <PathPointType Anchor="0 0" LeftDirection="0 0" RightDirection="0 0"/>
                <PathPointType Anchor="0 180" LeftDirection="0 180" RightDirection="0 180"/>
                <PathPointType Anchor="180 180" LeftDirection="180 180" RightDirection="180 180"/>
                <PathPointType Anchor="180 0" LeftDirection="180 0" RightDirection="180 0"/>
              </PathPointArray>
            </GeometryPathType>
          </PathGeometry>
        </Properties>
      </Rectangle>
      <Rectangle Self="urect2" ContentType="GraphicType" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 220 80" FillColor="Color/Blue" StrokeColor="Swatch/None" StrokeWeight="0">
        <Properties>
          <PathGeometry>
            <GeometryPathType PathOpen="false">
              <PathPointArray>
                <PathPointType Anchor="0 0" LeftDirection="0 0" RightDirection="0 0"/>
                <PathPointType Anchor="0 180" LeftDirection="0 180" RightDirection="0 180"/>
                <PathPointType Anchor="180 180" LeftDirection="180 180" RightDirection="180 180"/>
                <PathPointType Anchor="180 0" LeftDirection="180 0" RightDirection="180 0"/>
              </PathPointArray>
            </GeometryPathType>
          </PathGeometry>
        </Properties>
      </Rectangle>
    </Group>
  </Spread>
</idPkg:Spread>

A shape at the origin, placed by its transform

The rectangle below draws a 300 × 120 outline from 0, 0 and is placed with ItemTransform="1 0 0 1 150 200": no scale, no rotation, moved 150 pt right and 200 pt down. Change tx and ty and it moves; change a or d and it scales. The anchors stay the same.

A rectangle drawn at the origin and placed by the translation of its ItemTransform.

Spreads/Spread_uspread.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Spread xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <Spread Self="uspread" PageCount="1" BindingLocation="0" ShowMasterItems="true" AllowPageShuffle="true" ItemTransform="1 0 0 1 0 0">
    <Page Self="upage" Name="1" AppliedMaster="umaster" ItemTransform="1 0 0 1 0 0" GeometricBounds="0 0 841.89 595.276" MasterPageTransform="1 0 0 1 0 0"/>
    <Rectangle Self="urect" ItemTransform="1 0 0 1 150 200" FillColor="Color/Red" StrokeColor="Swatch/None" StrokeWeight="0">
      <Properties>
        <PathGeometry>
          <GeometryPathType PathOpen="false">
            <PathPointArray>
              <PathPointType Anchor="0 0" LeftDirection="0 0" RightDirection="0 0"/>
              <PathPointType Anchor="0 120" LeftDirection="0 120" RightDirection="0 120"/>
              <PathPointType Anchor="300 120" LeftDirection="300 120" RightDirection="300 120"/>
              <PathPointType Anchor="300 0" LeftDirection="300 0" RightDirection="300 0"/>
            </PathPointArray>
          </GeometryPathType>
        </PathGeometry>
      </Properties>
    </Rectangle>
    <TextFrame Self="uframe" ParentStory="ustory" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 57.638 145.8237" FillColor="Swatch/None" StrokeColor="Swatch/None" StrokeWeight="0">
      <Properties>
        <PathGeometry>
          <GeometryPathType PathOpen="false">
            <PathPointArray>
              <PathPointType Anchor="0 0" LeftDirection="0 0" RightDirection="0 0"/>
              <PathPointType Anchor="0 400" LeftDirection="0 400" RightDirection="0 400"/>
              <PathPointType Anchor="480 400" LeftDirection="480 400" RightDirection="480 400"/>
              <PathPointType Anchor="480 0" LeftDirection="480 0" RightDirection="480 0"/>
            </PathPointArray>
          </GeometryPathType>
        </PathGeometry>
      </Properties>
    </TextFrame>
  </Spread>
</idPkg:Spread>

Always write it

InDesign's own packages carry ItemTransform on every <Spread>, <Page> and page item, even when the value is 1 0 0 1 0 0. InDesign does not read a missing attribute as the identity: in a measured case, every transform-less item of a facing-page document opened one page width to the left, leaving the left pages empty, and the same file with ItemTransform="1 0 0 1 0 0" added to each item opened correctly. A writer should spell it out every time.

Precision matters as well. The values are decimal text; a writer that rounds them through single-precision floats drifts items by fractions of a point on every save. Writing the value back exactly as read, when it has not changed, avoids that.

In Paged: a missing ItemTransform is read as the identity on import, and the exporter always writes one. Spread rotation and scale are applied when rendering.

Supported · verified

Frequently asked questions

What do the six numbers in ItemTransform mean? They are a b c d tx ty of a 2D affine matrix: x' = a·x + c·y + tx and y' = b·x + d·y + ty. a and d scale, b and c shear or rotate, tx and ty translate, with a positive ty moving down.

What is an item's ItemTransform relative to? Its parent: the spread for a top-level item, the group for a group member, and the host frame for content pasted into a frame. It is never relative to a page.

Can I leave out ItemTransform when it is the identity? No. InDesign writes 1 0 0 1 0 0 explicitly and does not read a missing attribute as the identity. Write it on every spread, page and page item.

How do nested Group transforms combine? By composition, innermost first: the member's own matrix, then each enclosing group's, out to the spread. A member two groups deep is outer ∘ inner ∘ member.

On this page