Package com.pdfgate
Class ProtectPdfParams
java.lang.Object
com.pdfgate.ProtectPdfParams
Parameters for protecting a PDF by document ID.
Use ProtectPdfParams.EncryptionAlgorithm to select AES256 (default) or AES128. Set
userPassword and ownerPassword to control access and permissions,
and use the disable flags to restrict printing, copying, or editing. Responses are
JSON-only.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forProtectPdfParams.static enumSupported encryption algorithms. -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtectPdfParams.Builderbuilder()Creates a new builder for protect PDF parameters.Returns the encryption algorithm.Returns whether copying is disabled.Returns whether editing is disabled.Returns whether printing is disabled.Returns the document id when protecting by document id.Returns whether metadata is encrypted.Returns whether the response is JSON.Returns metadata to attach to the document.Returns the owner password, if provided.Returns the pre-signed URL expiration time in seconds.Returns the user password, if provided.booleanReturns whether the response is JSON.
-
Method Details
-
builder
Creates a new builder for protect PDF parameters.- Returns:
- the builder for protect PDF parameters.
-
getDocumentId
Returns the document id when protecting by document id.- Returns:
- the document id when protecting by document id.
-
getAlgorithm
Returns the encryption algorithm.- Returns:
- the encryption algorithm.
-
getUserPassword
Returns the user password, if provided.- Returns:
- the user password, if provided.
-
getOwnerPassword
Returns the owner password, if provided.- Returns:
- the owner password, if provided.
-
getDisablePrint
Returns whether printing is disabled.- Returns:
- whether printing is disabled.
-
getDisableCopy
Returns whether copying is disabled.- Returns:
- whether copying is disabled.
-
getDisableEditing
Returns whether editing is disabled.- Returns:
- whether editing is disabled.
-
getEncryptMetadata
Returns whether metadata is encrypted.- Returns:
- whether metadata is encrypted.
-
getJsonResponse
Returns whether the response is JSON.- Returns:
- whether the response is JSON.
-
isJsonResponse
public boolean isJsonResponse()Returns whether the response is JSON.- Returns:
- whether the response is JSON.
-
getPreSignedUrlExpiresIn
Returns the pre-signed URL expiration time in seconds.- Returns:
- the pre-signed URL expiration time in seconds.
-
getMetadata
Returns metadata to attach to the document.- Returns:
- metadata to attach to the document.
-