PdfOutline

data class PdfOutline(val title: String, val children: List<PdfOutline>, val rawDestination: PdfObject?, val action: PdfAction?, val count: Int, val italic: Boolean, val bold: Boolean, val color: RgbColor?)

One node in the document outline (a.k.a. bookmarks) tree — ISO 32000-1 §12.3.3.

Each node has a title (UTF-16BE or PDFDocEncoding text), zero or more children, and an optional destination (dest). The destination is stored unresolved so the caller can choose whether to resolve it (cost: one map lookup + page-ref translation).

The flag bits (italic, bold) and node colour come from the spec's /F and /C entries; readers may render bookmarks accordingly.

Constructors

Link copied to clipboard
constructor(title: String, children: List<PdfOutline>, rawDestination: PdfObject?, action: PdfAction?, count: Int, italic: Boolean, bold: Boolean, color: RgbColor?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Parsed /A action (typed). null when the outline has no /A entry.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val count: Int

/Count from the spec — sum of visible descendants. Sign indicates open (>0) or closed (<0). 0 = leaf.

Link copied to clipboard

True if this node is open by default. Closed nodes report a negative count.

Link copied to clipboard
Link copied to clipboard

Raw destination value as found in /Dest or /A/D, or null. Use PdfDocument.resolveDestination.

Link copied to clipboard