linkToAnchor

fun linkToAnchor(anchor: String, block: ColumnScope.() -> Unit)

Wraps the content added in block in a clickable region that jumps to the anchor registered under the same id — the internal-link counterpart of link. Forward references are fine: the anchor may appear later in the document.

Clickable on iOS and JVM/Desktop; on Android only the visual styling renders (no annotation support in PdfDocument). Style the content yourself, exactly like link.

Parameters

anchor

the anchor id to jump to.