Paged.The open publishing system
The format atlas
Geometry & coordinates

IDML Reference

Geometry & coordinates

The coordinate spaces of an IDML layout — points, Y growing downward, spread space with the spine at x = 0, and the transforms that nest them.

Tier: IntermediateIntermediateIIexplanation

Reviewed against engine v0.71.6

IDML places every page item in its spread's coordinate space, measured in points with Y growing downward, through a chain of affine transforms.

In short Distances are points (1/72 inch). Y grows downward. A page item is not positioned relative to a page: it is a child of a <Spread>, and its coordinates are spread coordinates, where the spine is at x = 0. Each <Page> is placed in that same space by its own ItemTransform. Inside every item there is a second space, its own, in which its outline is drawn; the item's ItemTransform maps that inner space into its parent's space. This chapter covers the spaces, the transforms between them, and how an outline is written.

Three spaces

Reading coordinates comes down to knowing which space a number lives in:

SpaceWhat lives thereMapped into its parent by
Item spacean item's PathGeometry anchors and its GeometricBoundsthe item's ItemTransform
Parent spacethe spread, an enclosing Group, or the frame an item was pasted intothe parent's own ItemTransform, up to the spread
Spread spaceevery page item once its transforms are applied, and every pagethe spread's ItemTransform (onto the pasteboard)

A page has an inner space too: its GeometricBounds are written in it, and its ItemTransform maps them into spread space. The two pages of a facing spread sit side by side in spread space because their transforms put the left page at negative x and the right page at positive x. Units & origin works through a real two-page spread.

A placed image adds one more level: the <Image> inside a frame carries its own ItemTransform, relative to the frame. That is how an image is scaled and cropped inside its frame. Supported · verified

The pages in this chapter

  • Units & originBeginnerI· explanationpoints, the downward Y axis, spread space and the pasteboard.
  • ItemTransformIntermediateII· referencethe six-number matrix, where it appears, and how transforms compose.
  • GeometricBoundsIntermediateII· referencethe y1 x1 y2 x2 bounding box.
  • PathGeometryProIII· referenceoutlines as anchors and Bézier handles, including how an <Oval> is spelled.
  • Compound pathsProIII· explanationseveral contours in one shape, and how holes are made.

Frequently asked questions

What coordinate system does IDML use? Points, with X growing to the right and Y growing downward. Page items use the coordinate space of their spread, whose origin is on the spine. Each item also has an inner space for its own outline, mapped into its parent by its ItemTransform.

Are page item coordinates relative to the page? No. Page items are children of the <Spread>, not of a <Page>, and their transforms map into spread space. To find an item's position on a page, subtract the page's own placement in the spread.

Why does a shape's outline start at 0, 0 when the shape is in the middle of the page? Because the outline is written in the item's own space. The ItemTransform then moves that space to where the item sits. Position and outline are stored separately.

On this page