GeometricBounds
GeometricBounds is an IDML element's axis-aligned bounding box in its own space, written in the y-before-x order y1 x1 y2 x2 (top, left, bottom, right).
GeometricBounds is an element's axis-aligned bounding box, written in the y-before-x order y1 x1 y2 x2.
In short GeometricBounds is four numbers in points: top, left, bottom, right,
with the vertical coordinate first. Width is x2 − x1 and height is y2 − y1. Every
<Page> carries it, and it is the page's only geometry. On page items it is optional and
rare: InDesign's own exports describe a page item by its
PathGeometry, and a reader derives the
box from the path. The bounds are in the element's own space; its
ItemTransform maps them into the parent.
The axis order is y before x
GeometricBounds="y1 x1 y2 x2" top left bottom right| Attribute · GeometricBounds (y1 x1 y2 x2) | Type / values | Support | Notes |
|---|---|---|---|
| y1 | number (pt) | — | Top edge. |
| x1 | number (pt) | — | Left edge. |
| y2 | number (pt) | — | Bottom edge: the larger Y, because Y grows downward. |
| x2 | number (pt) | — | Right edge. |
A value with any count other than four numbers is not a box. A page declared
GeometricBounds="0 0 841.89 595.276" is 595.276 pt wide and 841.89 pt tall: an A4
page whose own space starts at its top-left corner. Page bounds do not have to start at
0 0; what places the page is the bounds mapped through its ItemTransform.
Bounds and the outline
GeometricBounds is only a box. For an axis-aligned rectangle it matches the outline; for
an ellipse, a triangle or a curve it is the box around the outline. Where it is absent, the
box comes from the path: the smallest and largest x and y over the path's anchor points.
Most page items in real documents carry no GeometricBounds at all: InDesign writes the
path and nothing else. A writer that emits both should keep them consistent.
Where it appears
| Element | Use |
|---|---|
Page | The page rectangle in the page's own space. Required: a page without it has no size. |
| page items | Optional. Derived from the PathGeometry when absent. |
The bounds are in the element's own inner space, the same space as its path anchors.
The element's ItemTransform maps that space into the parent: the spread for a page or a
top-level item, a group for a group member.
In Paged: a page without parseable
GeometricBoundsis skipped. On a page item that carries both, the attribute wins over the path. Supported · verified
Frequently asked questions
What is the axis order of GeometricBounds?
y1 x1 y2 x2: top, left, bottom, right. The vertical coordinate comes first, unlike path
anchors, which are written x y.
How are width and height computed?
Width is x2 − x1, height is y2 − y1. Because Y grows downward, y2 is the larger
value.
Why do my page items have no GeometricBounds?
Because InDesign does not write them on page items. It writes the outline as
PathGeometry; the bounding box is the extent of the path's anchors.
Are GeometricBounds in page coordinates?
No. They are in the element's own space. Map them through the element's ItemTransform,
and through any enclosing group's, to get spread coordinates.
ItemTransform
ItemTransform is the six-number affine matrix (a b c d tx ty) that maps an IDML element's inner space into its parent's space; InDesign writes it everywhere.
PathGeometry
PathGeometry is an IDML page item's outline — GeometryPathType contours of PathPointType anchors with Bézier handles, plus PathOpen, and how an Oval is spelled.