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.
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 · Spread | Values | Paged | paged.set |
|---|---|---|---|
| AllowPageShuffle | false | true | not read | |
| BindingLocation | integer | written | |
| ItemTransform | number-list | read · written | |
| PageCount | integer | written | |
| Self | id | read · written | |
| ShowMasterItems | true | read | |
| FlattenerOverride | Default | not read | |
| PageTransitionDirection | NotApplicable | not read | |
| PageTransitionDuration | Medium | not read | |
| PageTransitionType | None | not read |
PageCountis the number of<Page>children.BindingLocationis the index of the spine among them:0for a single page (the spine is at its left edge),1for 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.ItemTransformplaces 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.ShowMasterItemsdecides 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.AllowPageShuffleandFlattenerOverrideare 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.
Supported · verifiedPageCountandBindingLocationare not read on import (the pages are counted) and are always written on export.
The Page element
| Attribute · Page | Values | Paged | paged.set |
|---|---|---|---|
| AppliedMaster | ref | read · written | appliedMaster |
| Name | enum / integer / text | read · written | |
| Self | id | read · written | |
| GeometricBounds | bounds (pt) | read · written | pageBounds |
| ItemTransform | number-list | read · written | |
| MasterPageTransform | number-list | read · written | |
| OverrideList | id / text | read · written | |
| AppliedTrapPreset | TrapPreset reference | not read | |
| Descriptor in Properties | — | not read | |
| GridStartingPoint | TopOutside | not read |
GeometricBoundsis the page rectangle in the page's own space,top left bottom right. It is the page's size.ItemTransformmaps those bounds into the spread. InDesign's own files place the left page of an A4 spread at1 0 0 1 -595.276 -420.945and the right page at1 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.AppliedMasteris theSelfof the master spread applied to the page, ornfor none.MasterPageTransformmaps the master page onto this page; usually the identity.OverrideListnames master items the page has overridden; see override resolution.Nameis 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.
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.Guideelements also appear directly under the<Spread>.Propertieswith aLabel: key/value metadata attached to the page by scripts and plugins.
| Attribute · MarginPreference | Values | Paged | paged.set |
|---|---|---|---|
| Bottom | length (pt) | read | pageMarginBottom |
| ColumnCount | number (count) | read | pageColumnCount |
| ColumnGutter | length (pt) | read | pageColumnGutter |
| Left | length (pt) | read | pageMarginLeft |
| Right | length (pt) | read | pageMarginRight |
| Top | length (pt) | read | pageMarginTop |
| ColumnDirection | Horizontal | not read | |
| ColumnsPositions | number-list | not read |
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>.
Layout model
IDML's layout model — a document of spreads, each holding pages and the page items placed in spread coordinates, with master spreads supplying repeating layout.
Page items and stacking
What an IDML spread contains, and how layer order and document order together set the back-to-front paint order of its page items.