RichTextNode

data class RichTextNode(val spans: List<Span>, val align: TextAlign = TextAlign.Start, val lineHeight: Sp = Sp.Zero) : PdfNode

Multi-style paragraph. A flat list of spans are word-wrapped together across one paragraph box; line breaks happen at word boundaries the same way as a plain TextNode, but each line preserves its underlying span styles instead of collapsing them.

Constructors

Link copied to clipboard
constructor(spans: List<Span>, align: TextAlign = TextAlign.Start, lineHeight: Sp = Sp.Zero)

Properties

Link copied to clipboard

horizontal alignment of wrapped lines inside the paragraph slot. Same semantics as TextStyle.align.

Link copied to clipboard

optional override for the paragraph's line height. 0.sp means the renderer picks the maximum natural line height across the spans on each line.

Link copied to clipboard

the spans in source order. The paragraph reads them as if they were concatenated.