PdfElixide.Document.OutlineItem (pdf_elixide v0.9.0)

Copy Markdown View Source

A single item (bookmark) in a PDF document's outline — its table of contents.

Outline items form a tree: each item carries a :title, an optional destination, and a list of nested :children (sub-bookmarks). The document's outline is the list of top-level items returned by PdfElixide.Document.outline/1.

The :dest field is where the item points, as one of:

  • {:page, page_index} — a zero-based page index within the document
  • {:named, name} — a named destination that could not be resolved to a page index (the raw name string is preserved)
  • nil — the item has no determinable destination

Named destinations are only surfaced when pdf_oxide could not resolve them; resolvable ones already arrive as {:page, page_index}.

Summary

Types

Where an outline item points.

t()

Types

dest()

@type dest() :: {:page, non_neg_integer()} | {:named, String.t()} | nil

Where an outline item points.

t()

@type t() :: %PdfElixide.Document.OutlineItem{
  children: [t()],
  dest: dest(),
  title: String.t()
}