document_encrypt

        document_encrypt( (document_handle)handle - document handle, (str)user_password - user password, (str)owner_password - owner password, (Permissions)permissions - document permissions, see Permissions for details, (CryptoAlgorithm)crypto_algorithm - cryptographic algorithm, see CryptoAlgorithm for details, (bool)use_pdf_20 - support for revision 6 (Extension 8)) -> None :

Encrypts the document. Call then Save to get encrypted version of the document.