View Source Idmlx.Components.Page (idmlx v0.2.1)

Represents a page in an InDesign document.

This module defines the structure for pages, including:

  • Geometric properties (bounds, transforms)
  • Spatial information (coordinates, aspect ratio)
  • Page orientation (face)
  • Page content (items)

Page Structure

  • aspect_ratio - Width to height ratio of the page
  • geometric_bounds - Raw page boundaries [y1, x1, y2, x2]
  • item_transform - Transformation matrix [a, b, c, d, tx, ty]
  • coordinates - Calculated page coordinates after transformation
  • face - Page orientation ("RECTO" or "VERSO")
  • items - List of page elements (TextFrames, Rectangles, etc.)

Examples

%Idmlx.Components.Page{
  aspect_ratio: 0.707,
  geometric_bounds: [0.0, 0.0, 841.89, 595.28],
  coordinates: %{"x1" => 0.0, "y1" => 0.0, "x2" => 595.28, "y2" => 841.89},
  face: "RECTO",
  items: [%TextFrame{}, %Rectangle{}]
}

Summary

Types

coordinates()

@type coordinates() :: %{required(String.t()) => float()}

t()

@type t() :: %Idmlx.Components.Page{
  aspect_ratio: float() | nil,
  coordinates: coordinates() | nil,
  face: String.t() | nil,
  geometric_bounds: [float()] | nil,
  item_transform: [float()] | nil,
  items: [any()] | nil
}