Show / Hide Table of Contents

Class PasswordProtectParams.Builder

Builds a PasswordProtectParams instance.

Inheritance
System.Object
PasswordProtectParams.Builder
Namespace: Adobe.PDFServicesSDK.pdfjobs.parameters.protectpdf
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class Builder

Methods

Build()

Returns a new PasswordProtectParams instance built from the current state of this builder.

Declaration
public PasswordProtectParams Build()
Returns
Type Description
PasswordProtectParams

A new PasswordProtectParams instance

SetContentEncryption(ContentEncryption)

Sets the intended type of content to encrypt in the PDF file.

Declaration
public PasswordProtectParams.Builder SetContentEncryption(ContentEncryption contentEncryption)
Parameters
Type Name Description
ContentEncryption contentEncryption

the type of content to encrypt; can not be null

Returns
Type Description
PasswordProtectParams.Builder

this Builder instance to add any additional parameters

SetEncryptionAlgorithm(EncryptionAlgorithm)

Sets the intended encryption algorithm required for encrypting the PDF file. For AES-128 encryption, the password supports LATIN-I characters only. For AES-256 encryption, passwords supports Unicode character set.

Declaration
public PasswordProtectParams.Builder SetEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm)
Parameters
Type Name Description
EncryptionAlgorithm encryptionAlgorithm

the encryption algorithm; can not be null

Returns
Type Description
PasswordProtectParams.Builder

this Builder instance to add any additional parameters

SetOwnerPassword(String)

Sets the intended owner password required to control access permissions in the encrypted PDF file. This password can also be used to open/view the encrypted PDF file. Allowed maximum length for the owner password is 128 bytes.

Declaration
public PasswordProtectParams.Builder SetOwnerPassword(string ownerPassword)
Parameters
Type Name Description
System.String ownerPassword

the owner password; can not be null or empty

Returns
Type Description
PasswordProtectParams.Builder

SetPermissions(Permissions)

Sets the intended permissions for the encrypted PDF file. This includes permissions to allow printing, editing and content copying in the PDF document. Permissions can only be used in case the owner password is set.

Declaration
public PasswordProtectParams.Builder SetPermissions(Permissions permissions)
Parameters
Type Name Description
Permissions permissions

the permissions; can not be null

Returns
Type Description
PasswordProtectParams.Builder

this Builder instance to add any additional parameters

SetUserPassword(String)

Sets the intended user password required for opening the encrypted PDF file. Allowed maximum length for the user password is 128 bytes.

Declaration
public PasswordProtectParams.Builder SetUserPassword(string userPassword)
Parameters
Type Name Description
System.String userPassword

the user password; can not be null or empty

Returns
Type Description
PasswordProtectParams.Builder

this Builder instance to add any additional parameters

In This Article
Back to top Copyright © 2020 Adobe. All rights reserved.