Work in progress — this reference is being written in the open. Unfinished pages are excluded from search engines.
Paged · IDML Reference
Package anatomy

Resource parts

The Resources folder holds an IDML document's shared definitions — colors and gradients in Graphic.xml, named styles in Styles.xml, the font manifest in Fonts.xml, and document preferences in Preferences.xml.

Intermediate· reference

The Resources folder holds the shared definitions — colors, styles, fonts, preferences — that the rest of an IDML document refers to by id.

In short: The Resources folder is an IDML document's shared vocabulary. A text frame names a FillColor, a paragraph names an AppliedParagraphStyle, a run names an AppliedFont — and the value behind each of those names is defined once, here, so it can be reused across every spread and story. Four parts live in the folder: Graphic.xml (colors, swatches, and gradients), Styles.xml (the named style groups), Fonts.xml (a font manifest), and Preferences.xml (document preferences). This page covers what each part holds and how much of it our parser reads today.

Our parser does not discover these parts from the design map's idPkg:* elements — it opens Resources/Graphic.xml and Resources/Styles.xml directly, at their fixed package paths, and parses each if present. A document missing either part still opens; the parser substitutes an empty palette or an empty style sheet rather than failing. Fonts.xml and Preferences.xml are not opened at all today.

Graphic.xml — colors, swatches, and gradients

The graphic resource is the document's swatch palette. The parser keys every <Color> by its Self id (e.g. Color/Black), so a FillColor="Color/Black" elsewhere resolves to a real color value. <Swatch> entries — the special None / Paper / Registration cases and named wrappers — are captured separately and can indirect to a Color one level. <Gradient> entries collect their <GradientStop> children, each of which references a Color by id at a Location along the ramp.

Attribute · ColorType / valuesSupportNotes
Selfstring idSupportedThe palette key, e.g. "Color/Black"; what FillColor / StrokeColor point at.
NamestringParsed, not yet renderedHuman-readable swatch name; informational.
SpaceCMYK | RGB | LAB | GraySupportedColor space of ColorValue. Unrecognised values are treated as unresolved.
ColorValuespace-separated numbersSupportedChannel values in Space — four for CMYK, three for RGB, one for Gray.
ModelProcess | Spot | MixedInkSupportedProcess is the default. Spot inks preview through their CMYK alternate; MixedInk is recognised but not decomposed.
AlternateSpaceCMYK | RGB | LAB | GraySupportedColor space of a spot swatch’s fallback. Used for the CMYK preview path.
AlternateColorValuespace-separated numbersSupportedChannel values in AlternateSpace; four percentages for a CMYK alternate.
TintValuenumber 0–100SupportedSwatch-level tint — "this ink at N%". Folded into the CMYK channels before color management. −1 (Adobe’s unset sentinel) reads as absent.
AlphaPercentage / Alphanumber 0–100 (or 0–1)SupportedOptional opacity, consumed by gradient-feather stops. Absent ⇒ opaque.
Attribute · GradientType / valuesSupportNotes
Selfstring idSupportedGradient key, e.g. "Gradient/Sky".
NamestringParsed, not yet renderedHuman-readable name; informational.
TypeLinear | RadialSupportedRamp geometry; absent reads as Linear. Anything else is captured as Unknown.
GradientStop (child)StopColor (id) + Location (0–100)SupportedEach stop references a Color by id at a normalised position; collected in document order.

InDesign also writes <ColorGroup> groupings into this part; the parser captures them for round-trip, but the renderer does not branch on them.

Parsed, not yet renderedColorGroup

Styles.xml — the style groups

The style sheet is where every named style lives. InDesign nests styles under root group elements — <RootCharacterStyleGroup>, <RootParagraphStyleGroup>, <RootObjectStyleGroup>, <RootCellStyleGroup>, and the table and TOC groups. The parser does not require the grouping wrappers; it picks up each style element by name wherever it appears and keys it by Self id. A story's AppliedParagraphStyle then resolves by looking that id up in the paragraph-style table.

Each style records the cascadable attributes the renderer consumes — font, size, fill, tracking, paragraph geometry, and so on. A style's BasedOn field names a parent style; the cascade is followed at resolve time and bounded so a cyclic chain can't loop. The conventional $ID/[No paragraph style] / $ID/[No character style] entries sit at the bottom of that chain as the document's defaults.

Attribute · Style group → entryType / valuesSupportNotes
CharacterStylein RootCharacterStyleGroupSupportedFont, size, fill, tracking, caps, baseline shift, underline/strikethru, and CJK ruby/kenten fields. Referenced by AppliedCharacterStyle.
ParagraphStylein RootParagraphStyleGroupSupportedEverything a character style carries plus paragraph geometry: justification, indents, spacing, tabs, bullets/numbering, drop caps, rules/shading/borders. Referenced by AppliedParagraphStyle.
ObjectStylein RootObjectStyleGroupSupportedFill / stroke / corner defaults for a page item. Referenced by AppliedObjectStyle; real documents lean on this for frame fills.
CellStylein RootCellStyleGroupSupportedPer-cell fill, vertical justification, and per-edge strokes. Referenced by AppliedCellStyle.
TableStylein RootTableStyleGroupSupportedRegion → cell-style map plus table border strokes and alternating-row fills. Referenced by AppliedTableStyle.
TOCStyleTOC style + entriesParsed, not yet renderedTitle, title style, and the ordered list of included paragraph styles. Captured; TOC resolution is a separate pass.
DashedStrokeStyle (+ Dotted/Striped/Wavy)custom stroke stylesParsed, not yet renderedCustom stroke patterns referenced via StrokeType. The Dashed pattern is consumed; the others are captured for round-trip.
Condition / ConditionSetconditional textParsed, not yet renderedVisibility toggles applied to text ranges. The renderer resolves individual conditions but does not branch on sets.

Fonts.xml — the font manifest

This part is a manifest, not a font store: <FontFamily> elements wrap <Font> entries that name a PostScriptName, a FontStyleName, a FontType, and an installed Status. It tells a consumer which faces the document expects. The actual font outlines come from the host system or from the renderer's own font set, not from this XML.

Our parser does not open Fonts.xml. Style and run elements carry the font by name (AppliedFont="Open Sans"), and the renderer matches that name against the fonts it has been given directly — so the manifest is informational and currently unread. Not yet parsedResources/Fonts.xml

Preferences.xml — document preferences

Preferences.xml carries document- and application-level preference elements (margins, grids, view and export settings, and the like). The design map points at it like any other part, but our parser does not open it: the path is read past, not acted on. Geometry the renderer actually needs — page bounds, frame insets, column settings — it reads from the spreads and frames themselves, not from this part. Not yet parsedResources/Preferences.xml

Together these four parts are the shared vocabulary. The next page covers the parts that use that vocabulary — the content parts that hold the pages and the text.

Frequently asked questions

What is stored in the Resources folder of an IDML package? The Resources folder holds the document's shared definitions: Graphic.xml for colors, swatches, and gradients; Styles.xml for the named paragraph, character, object, cell, and table styles; Fonts.xml as a font manifest; and Preferences.xml for document- and application-level preferences. The rest of the document references these by id rather than repeating them.

Does an IDML document store its actual fonts in Fonts.xml? No. Fonts.xml is a manifest, not a font store — it lists the faces a document expects (PostScript name, style, type, and installed status), but the actual font outlines come from the host system or the renderer's own font set. Our parser does not open Fonts.xml today; styles and runs name fonts by name, and the renderer matches that name against the fonts it has been given.

What happens if Graphic.xml or Styles.xml is missing? The document still opens. Our parser reads Graphic.xml and Styles.xml directly at their fixed paths and parses each if present; if either is absent, it substitutes an empty palette or empty style sheet rather than failing, and references that find no match simply fall back.

On this page