bookmark

open fun bookmark(title: String, level: Int, y: Float)

Adds an entry to the document's outline (the bookmark sidebar in PDF readers) pointing at the given vertical position on the current page. level nests entries: 0 is a top-level chapter, 1 a section inside the previous level-0 entry, and so on.

Backends without outline support (Android PdfDocument) default to a no-op.