encryption
Password-protects the document. Calling this more than once replaces the previous configuration. See PdfEncryption for the per-platform support matrix (full on JVM/Desktop, partial on iOS, no-op on Android).
encryption {
ownerPassword = "owner"
userPassword = "user"
allowPrinting = false
}Content copied to clipboard
Password-protects the document with a pre-built PdfEncryption. Useful when the configuration is assembled elsewhere; equivalent to the encryption builder overload.