Paged.The open publishing system
The format atlas
Package anatomy

IDML Reference / Package anatomy

Resource parts

The Resources folder holds an IDML document's shared definitions — swatches in Graphic.xml, faces in Fonts.xml, styles and preferences.

Tier: IntermediateIntermediateIIreference

Reviewed against engine v0.71.6

The Resources folder holds the definitions the rest of the document refers to by id: swatches, fonts, styles and preferences.

In short A text frame names a FillColor, a paragraph names an AppliedParagraphStyle, a run names an AppliedFont. The value behind each name is defined once, in one of four resource parts: Graphic.xml (colours, tints, gradients, inks and stroke styles), Fonts.xml (the families and faces in use), Styles.xml (every named style) and Preferences.xml (document settings and the defaults new objects get). Every package in the census behind the element reference carries all four.

Graphic.xml: swatches, inks and stroke styles

ElementWhat it defines
ColorA colour swatch: Model (Process, Spot), Space (CMYK, RGB, LAB) and ColorValue; a spot colour adds an AlternateSpace and AlternateColorValue
TintA named tint of another swatch: BaseColor names the colour, TintValue the percentage
MixedInkA swatch mixed from several inks
GradientA linear or radial ramp of GradientStop children, each with a StopColor, a Location and a Midpoint
SwatchThe reserved swatches: None, Paper, Registration
InkA printing ink: its type, screen angle, frequency and trap order
StrokeStyleA built-in stroke style that strokes refer to by name
DashedStrokeStyle, DottedStrokeStyle, …A custom stroke pattern
Attribute · ColorValuesSeen in
ColorEditablefalse | true100%
ColorOverrideHiddenreserved | Normal | Specialblack | Specialpaper | Specialregistration100%
ColorRemovablefalse | true100%
ColorValuelist (pt)100%
ModelProcess | Spot100%
Nametext100%
SelfColor reference100%
SpaceCMYK | RGB | LAB | Gray100%
The 8 attributes real documents use most. Seen in: the share of documents with a Color that set it. All 16 attributes of Color; what Paged reads, edits and writes is in its Paged support panel.

A tint is its own element. A TintValue attribute on a <Color> does not make that colour a tint: InDesign keeps a named tint only when it is written as <Tint BaseColor="…" TintValue="…">. Swatch folders (ColorGroup) are defined in the design map, not here. The colour model itself is covered in colour and swatches.

In Paged: colours, named tints, gradients and the reserved swatches are read and rendered. Custom stroke patterns are read from this part, a dashed style's dashes from its DashArray. A built-in StrokeStyle element is not read; a stroke that names one is drawn by the name. Ink and MixedInk are not read. Parsed, not rendered

Fonts.xml: the faces in use

The part lists one <FontFamily> per family, with one <Font> per face the document uses. A Font records the face's PostScriptName, its FontStyleName, its FontType and whether it was installed when the file was saved (Status); a variable font also records its design axes. CompositeFont entries define composite fonts for CJK text.

Attribute · FontValuesSeen in
FontFamilyenum / text100%
FontStyleNameenum / text100%
FontTypeOpenTypeCFF | OpenTypeCID | OpenTypeTT | TrueType100%
Nametext100%
PostScriptNamebuiltin / enum / text100%
SelfFont reference100%
StatusInstalled | NotAvailable | Substituted100%
FontStyleNameNativeenum / text89%
The 8 attributes real documents use most. Seen in: the share of documents with a Font that set it. All 18 attributes of Font; what Paged reads, edits and writes is in its Paged support panel.

The part holds no outlines, but it is not decoration. InDesign binds each font a story or style applies (an AppliedFont with its FontStyle) through these declarations. Measured in InDesign 20.0.1:

  • a face applied in the text but not declared here is reported as not available;
  • a declaration that names only the family (no instance) comes back substituted; what binds is one <Font> per face, named the way InDesign names it (Name="Fraunces Regular", FontStyleName="Regular").

In Paged: the importer does not open Fonts.xml; fonts are matched by the names in the stories and styles. The exporter writes a declaration for every applied face that lacks one.

Styles.xml: named styles

Styles sit in root groups, one per kind, and may be organised further in nested …StyleGroup folders:

Root groupStyleApplied by
RootCharacterStyleGroupCharacterStyleAppliedCharacterStyle on a character range
RootParagraphStyleGroupParagraphStyleAppliedParagraphStyle on a paragraph range
RootObjectStyleGroupObjectStyleAppliedObjectStyle on a page item
RootTableStyleGroupTableStyleAppliedTableStyle on a table
RootCellStyleGroupCellStyleAppliedCellStyle on a cell
(none: directly in the part)TOCStylea generated table of contents

A style inherits what it does not set from the style named in its BasedOn. The reserved entries $ID/[No paragraph style] and $ID/[No character style] end the chain, and ObjectStyle/$ID/[None] is what a page item with no object style names. The cascade is covered in styles.

Preferences.xml: settings and defaults

The part holds one element per preference panel. A few describe the document itself:

  • DocumentPreference: page size (PageWidth, PageHeight), FacingPages, binding, and the bleed and slug offsets;
  • ChapterNumberPreference: the document's chapter number, which chapter-number text variables show;
  • FootnoteOption, GridPreference, MarginPreference: footnote layout, baseline and document grids, and the margins new pages get.

Others are defaults InDesign applies to what is created or reflowed after opening: TextFramePreference and TextDefault for new frames and text, TextPreference for composition options. One was measured to change how existing text is set: TextPreference UseOpticalSize. With it true, InDesign re-instances runs in a variable font with an optical-size axis at their point size; with it false, they use the font's default instance.

The rest (export, print, view and XML preferences) configure the application and do not change the pages.

In Paged: the importer reads from this part the bleed and slug offsets in DocumentPreference, ChapterNumberPreference, FootnoteOption, GridPreference and the document's global light in TransparencyPreference; page sizes and facing pages come from the pages themselves. An edited bleed or slug is written back onto the existing DocumentPreference. The exporter writes TextPreference UseOpticalSize to match how it composed variable fonts.

Frequently asked questions

What is stored in the Resources folder of an IDML package? Four parts: Graphic.xml for swatches, inks and stroke styles; Fonts.xml for the families and faces in use; Styles.xml for paragraph, character, object, table, cell and TOC styles; and Preferences.xml for document settings and defaults.

Does an IDML document store its fonts in Fonts.xml? No outlines, only declarations. But the declarations matter: InDesign binds each applied font through them, and reports a face it cannot find declared there as missing.

How do I write a tint swatch? As its own <Tint> element in Graphic.xml, with BaseColor naming the colour and TintValue the percentage. A TintValue attribute on a <Color> is not a named tint.

Where are conditions and swatch folders defined? In the design map, not in a resource part. InDesign writes Condition, ConditionSet and ColorGroup as children of Document.

Which preferences change how an existing document looks? Few. DocumentPreference describes the document, ChapterNumberPreference feeds chapter numbers, and TextPreference UseOpticalSize changes which instance of a variable font is used. Most of the part holds defaults for new objects and application settings.

On this page