# `Kreuzberg.Page`
[🔗](https://github.com/kreuzberg-dev/kreuzberg/blob/main/lib/kreuzberg/page.ex#L1)

Structure representing a single page extracted from a multi-page document.

Matches the Rust `PageContent` struct.

## Fields

  * `:page_number` - Page number (0-indexed in Rust)
  * `:content` - Text content extracted from this page
  * `:tables` - Tables found on this page
  * `:images` - Images found on this page
  * `:hierarchy` - Optional hierarchy information (heading levels and blocks)
  * `:is_blank` - Whether the page is blank (nil if unknown)
  * `:layout_regions` - Detected layout regions on this page (nil if layout detection was not enabled)

## Examples

    iex> page = %Kreuzberg.Page{
    ...>   page_number: 0,
    ...>   content: "Page 1 content here"
    ...> }
    iex> page.page_number
    0

# `t`

```elixir
@type t() :: %Kreuzberg.Page{
  content: String.t(),
  hierarchy: Kreuzberg.PageHierarchy.t() | nil,
  images: [Kreuzberg.Image.t()],
  is_blank: boolean() | nil,
  layout_regions: [Kreuzberg.LayoutRegion.t()] | nil,
  page_number: non_neg_integer(),
  tables: [Kreuzberg.Table.t()]
}
```

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Creates a Page struct from a map.

Converts nested table and image maps to their proper struct types.

## Examples

    iex> Kreuzberg.Page.from_map(%{"page_number" => 0, "content" => "text"})
    %Kreuzberg.Page{page_number: 0, content: "text"}

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Converts a Page struct to a map.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
