metadata

fun metadata(block: MetadataScope.() -> Unit)

Configures document metadata (title, author, …). Calling this more than once replaces any previous values — fields not set in the latest call become null.

Encryption and attachments are configured separately via encryption and attachment; they survive across metadata { } calls and are merged into the final metadata at build time.