TocNode

data class TocNode(val maxLevel: Int, val style: TextStyle, val indentPerLevel: Dp, val spacing: Dp) : PdfNode

Placeholder for an automatically generated table of contents.

The renderer replaces this node before layout: it collects every BookmarkNode in the document, resolves their final page numbers with a dry-run pass, and expands the placeholder into one clickable row per bookmark — title, dotted leader, page number — wired to the bookmark's position through an internal link.

Only valid in a page body. Headers, footers, and watermarks are laid out per physical page and cannot host a TOC.

Constructors

Link copied to clipboard
constructor(maxLevel: Int, style: TextStyle, indentPerLevel: Dp, spacing: Dp)

Properties

Link copied to clipboard

horizontal indent applied per bookmark level.

Link copied to clipboard

deepest bookmark level included (0 = chapters only).

Link copied to clipboard
val spacing: Dp

vertical gap between entry rows.

Link copied to clipboard

text style for the entry rows.