Paged.The open publishing system
The format atlas
Package anatomy

IDML Reference / Package anatomy

Content parts

The Spreads, MasterSpreads and Stories parts hold the document itself — pages and the items on them, the master pages, and the text, each tied in by id.

Tier: IntermediateIntermediateIIreference

Reviewed against engine v0.71.6

The content parts, Spreads, MasterSpreads and Stories, hold the document itself: its pages, the items on them, and the text.

In short A spread part holds one <Spread>: its pages and every page item placed across them, in the spread's own coordinate space. A master spread part has the same shape and holds the template pages body pages inherit from. A story part holds one <Story>: text and formatting with no geometry, as runs of paragraph and character attributes with the <Br/> paragraph mark in between. A text frame on a spread links the two by naming its story in ParentStory.

The design map lists these parts with idPkg:Spread, idPkg:MasterSpread and idPkg:Story elements. The package below has one spread with two frames and two stories:

A one-page, two-story package: one spread with two frames, two stories, one master.

designmap.xmlRead / the source
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?aid style="50" type="document" readerVersion="6.0" featureSet="257" product="20.0(32)"?>
<Document xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0" Self="d" StoryList="ustory1 ustory2" Name="two-stories.indd" CMYKProfile="Coated FOGRA39 (ISO 12647-2:2004)" RGBProfile="sRGB IEC61966-2.1" SolidColorIntent="UseColorSettings" AfterBlendingIntent="UseColorSettings" DefaultImageIntent="UseColorSettings">
  <idPkg:Graphic src="Resources/Graphic.xml"/>
  <idPkg:Fonts src="Resources/Fonts.xml"/>
  <idPkg:Styles src="Resources/Styles.xml"/>
  <idPkg:Preferences src="Resources/Preferences.xml"/>
  <idPkg:Tags src="XML/Tags.xml"/>
  <idPkg:MasterSpread src="MasterSpreads/MasterSpread_umaster.xml"/>
  <idPkg:Spread src="Spreads/Spread_uspread.xml"/>
  <idPkg:Story src="Stories/Story_ustory1.xml"/>
  <idPkg:Story src="Stories/Story_ustory2.xml"/>
  <idPkg:BackingStory src="XML/BackingStory.xml"/>
</Document>

Spreads/Spread_<id>.xml: pages and the items on them

A spread part holds one <Spread>. Its children are the spread's <Page> elements, then its page items: <TextFrame>, <Rectangle>, <Oval>, <Polygon>, <GraphicLine> and <Group>, in stacking order from back to front.

Page items are not children of a page. They sit in the spread's coordinate space, and each <Page> is placed in that space by its own ItemTransform. In a facing spread the spine is at x = 0, so the left page sits at negative x. Which page an item belongs to is a matter of where it lies. The coordinate model is covered in geometry and coordinates.

Attribute · SpreadValuesSeen in
AllowPageShufflefalse | true100%
BindingLocationinteger100%
ItemTransformnumber-list100%
PageCountinteger100%
Selfid100%
ShowMasterItemstrue100%
The 6 attributes real documents use most. Seen in: the share of documents with a Spread that set it. All 11 attributes of Spread; what Paged reads, edits and writes is in its Paged support panel.

The attributes InDesign needs on every spread (PageCount, BindingLocation, an ItemTransform on the spread, on each page and on each item) are listed in what InDesign needs to open a file.

Pages

A <Page> gives its size as GeometricBounds, the master it applies as AppliedMaster, the master items it has overridden as OverrideList, and its label as Name (the page number as InDesign displayed it: "1", "iii", "A-3"). Its children hold the page's margins and columns (MarginPreference), its ruler guides (Guide) and typed properties such as PageColor. The details are in spreads and pages.

Attribute · PageValuesSeen in
AppliedMasterref100%
Nameenum / integer / text100%
Selfid100%
GeometricBoundsbounds (pt)100%
ItemTransformnumber-list100%
MasterPageTransformnumber-list100%
The 6 attributes real documents use most. Seen in: the share of documents with a Page that set it. All 18 attributes of Page; what Paged reads, edits and writes is in its Paged support panel.

Page items

Every page item has a Self id, an ItemTransform and its outline in <Properties><PathGeometry>. Most also carry a Name (the name shown in the Layers panel), ItemLayer (the layer it sits on), Visible and Locked, and an AppliedObjectStyle. A text frame adds the text links:

  • ParentStory names the story whose text flows into the frame;
  • PreviousTextFrame and NextTextFrame name the frames before and after it in the thread, or n at either end;
  • a TextFramePreference child holds its columns, insets and auto-sizing.

A rectangle, oval or polygon can contain another item, as InDesign's Paste Into does: an image, a group, or a text frame, clipped by the host's path. The element types are covered in page item types and text frames.

In Paged: text frames inside groups and inside paste-into hosts are read, with their transforms composed, and are clipped by the host. A group pasted into a host is not yet read. Supported · verified

MasterSpreads/MasterSpread_<id>.xml: master pages

A master spread has the same shape as a spread: one <MasterSpread> with <Page> children and page items. Body pages apply it by naming its id in AppliedMaster, and its items appear on every page that applies it unless the page overrides them. A master spread also records its name three ways: NamePrefix ("A"), BaseName ("Master") and the Name they compose ("A-Master"). Masters are covered in master spreads and overrides.

Stories/Story_<id>.xml: the text

A story part holds one <Story>: the text and its formatting, with no geometry. Its content is a flat sequence of <ParagraphStyleRange> elements, each holding <CharacterStyleRange> elements, which hold the characters:

  • a ParagraphStyleRange is a run of one or more paragraphs that share their paragraph attributes, including AppliedParagraphStyle;
  • a CharacterStyleRange is a run of characters that share their character attributes, including AppliedCharacterStyle; the font is a typed child, <Properties><AppliedFont type="string">;
  • Content holds the characters themselves;
  • <Br/> is the paragraph mark: it ends every paragraph except the story's last, inside the last character range of that paragraph;
  • a forced line break is the character U+2028 and a tab is U+0009, both inside Content.

A new ParagraphStyleRange does not start a new paragraph by itself; only a <Br/> does. See the paragraph model and story structure.

A story's own settings, such as its orientation for vertical CJK text, are in a StoryPreference child of <Story>.

In Paged: stories are read as paragraph and character runs, with tables, anchored objects and markers in place. Parsed, not rendered

How the ids tie back to the design map

The design map's StoryList lists the story ids; each has an idPkg:Story whose src names its part, and the part's <Story Self="…"> carries the same id. The id appears once more as ParentStory on each frame the story flows through. Listed in the manifest, named on a frame, carried on the story element: that triple places a story's text on a page. InDesign discards a story that no frame references when it opens the file. Following ids from part to part is the subject of how the parts reference each other.

Frequently asked questions

What is the difference between a spread, a master spread and a story? A spread holds pages and the page items placed across them. A master spread holds the template pages and items that body pages inherit, in the same shape. A story holds text and its formatting with no geometry; a text frame on a spread links to it through ParentStory.

Are page items children of a Page? No. They are children of the Spread, positioned in the spread's coordinate space. Pages are placed in the same space by their own ItemTransform, and an item belongs to the page it lies on.

How does a TextFrame connect to the text it displays? It names a story in ParentStory. The story part holds the text; the frame supplies the area it is composed into, and NextTextFrame names the frame the text continues in.

Is <Br/> a line break? No. <Br/> is the paragraph mark: it ends a paragraph. A line break that stays inside the paragraph is the character U+2028 in Content.

What happens to a story that no frame uses? InDesign drops it when it opens the file. A story only stays in the document while a frame (or an anchored frame inside another story) places it.

On this page