paged.IDML Reference
Layout model

Spreads and pages

The IDML Spread and Page elements — how pages are placed in spread coordinates, the attributes InDesign needs to open a spread, and margins and guides.

Tier: IntermediateIntermediateIIreference

A Spread is the coordinate space of one opening; each Page is a rectangle placed in that space by its own ItemTransform.

In short A Spreads/Spread_*.xml part holds one <Spread>. Its children are its <Page> elements followed by its page items. The spread's space has x = 0 on the spine. Each page has its own GeometricBounds and an ItemTransform that places it in the spread, which is how the two pages of a facing spread end up side by side. InDesign always writes PageCount, BindingLocation and ItemTransform on a spread, and it needs them: without the first two it can open a one-page spread as a facing pair with an empty page.

The Spread element

Attribute · SpreadValuesPagedpaged.set
AllowPageShufflefalse | truenot read
BindingLocationintegerwritten
ItemTransformnumber-listread · written
PageCountintegerwritten
Selfidread · written
ShowMasterItemstrueread
FlattenerOverrideDefaultnot read
PageTransitionDirectionNotApplicablenot read
PageTransitionDurationMediumnot read
PageTransitionTypeNonenot read
The 10 attributes real documents use most. All 11 attributes of Spread →
  • PageCount is the number of <Page> children. BindingLocation is the index of the spine among them: 0 for a single page (the spine is at its left edge), 1 for a facing pair. InDesign writes both on every spread and reads them: given a one-page spread without them, it opened the spread as a facing pair and added an empty page.
  • ItemTransform places the spread on the pasteboard. InDesign uses its translation to stack spreads one below the other; it does not move items relative to their pages. A rotation in it turns the whole spread.
  • ShowMasterItems decides whether the pages of this spread show their master's items. It is a spread attribute: InDesign writes it on <Spread> and <MasterSpread> and ignores it on <Page>. See master items and stamping.
  • AllowPageShuffle and FlattenerOverride are editing and output settings that do not change what the spread looks like.

In Paged: a spread's rotation and scale are applied when rendering; its translation cancels against the pages. PageCount and BindingLocation are not read on import (the pages are counted) and are always written on export.

Supported · verified

The Page element

Attribute · PageValuesPagedpaged.set
AppliedMasterrefread · writtenappliedMaster
Nameenum / integer / textread · written
Selfidread · written
GeometricBoundsbounds (pt)read · writtenpageBounds
ItemTransformnumber-listread · written
MasterPageTransformnumber-listread · written
OverrideListid / textread · written
AppliedTrapPresetTrapPreset referencenot read
Descriptor
in Properties
—not read
GridStartingPointTopOutsidenot read
The 10 attributes real documents use most. All 18 attributes of Page →
  • GeometricBounds is the page rectangle in the page's own space, top left bottom right. It is the page's size.
  • ItemTransform maps those bounds into the spread. InDesign's own files place the left page of an A4 spread at 1 0 0 1 -595.276 -420.945 and the right page at 1 0 0 1 0 -420.945: the spine at x = 0, the pages centred vertically on y = 0. Always write it; InDesign does not read a missing one as the identity.
  • AppliedMaster is the Self of the master spread applied to the page, or n for none. MasterPageTransform maps the master page onto this page; usually the identity.
  • OverrideList names master items the page has overridden; see override resolution.
  • Name is the page label as InDesign displays it: 1, iii, A-3. It reflects the section numbering; see sections, numbering & variables.

Two pages in one spread. The left page's ItemTransform moves it left of the spine; the right page starts at the spine. Both apply the same master.

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="2" BindingLocation="1" ShowMasterItems="true" AllowPageShuffle="true" ItemTransform="1 0 0 1 0 0">
    <Page Self="upageL" Name="2" AppliedMaster="umaster" ItemTransform="1 0 0 1 -595.276 0" GeometricBounds="0 0 841.89 595.276" MasterPageTransform="1 0 0 1 0 0"/>
    <Page Self="upageR" Name="3" AppliedMaster="umaster" ItemTransform="1 0 0 1 0 0" GeometricBounds="0 0 841.89 595.276" MasterPageTransform="1 0 0 1 0 0"/>
    <TextFrame Self="uframeL" ParentStory="ustoryL" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 -537.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>
    <TextFrame Self="uframeR" ParentStory="ustoryR" 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>

This example keeps the page tops at y = 0. The spread-coordinates example writes the same spread with InDesign's vertical centring; both open identically, because a page's position is its bounds mapped through its transform.

What a page contains

A <Page> has no page items. It can hold:

  • MarginPreference: the margins and the column grid (ColumnCount, ColumnGutter) that guide layout on this page. They do not clip anything.
  • Guide: ruler guides placed on this page. Guide elements also appear directly under the <Spread>.
  • Properties with a Label: key/value metadata attached to the page by scripts and plugins.
Attribute · MarginPreferenceValuesPagedpaged.set
Bottomlength (pt)readpageMarginBottom
ColumnCountnumber (count)readpageColumnCount
ColumnGutterlength (pt)readpageColumnGutter
Leftlength (pt)readpageMarginLeft
Rightlength (pt)readpageMarginRight
Toplength (pt)readpageMarginTop
ColumnDirectionHorizontalnot read
ColumnsPositionsnumber-listnot read
The 8 attributes real documents use most. All 8 attributes of MarginPreference →

In Paged: margins and ruler guides are read and written back.

Parsed, partly rendered

Frequently asked questions

What is the difference between a spread and a page? A <Spread> is a coordinate space holding the pages and items of one opening. A <Page> is a rectangle placed in that space by its ItemTransform. Page items are children of the spread, not of the page.

Why does a page need both GeometricBounds and ItemTransform? The bounds give the page's size in its own space; the transform puts it in the spread. On a facing spread the transforms set the pages side by side, with the left page at negative x.

Which attributes must a writer put on a Spread? At least Self, PageCount, BindingLocation and ItemTransform, as InDesign does. Without PageCount and BindingLocation, InDesign may treat a single page as one half of a facing pair and add an empty page.

Where does ShowMasterItems go? On the <Spread>. InDesign ignores it on a <Page>.

On this page