Package com.pdfgate

Class ProtectPdfParams

java.lang.Object
com.pdfgate.ProtectPdfParams

public final class ProtectPdfParams extends Object
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.

  • Method Details

    • builder

      public static ProtectPdfParams.Builder builder()
      Creates a new builder for protect PDF parameters.
      Returns:
      the builder for protect PDF parameters.
    • getDocumentId

      public String getDocumentId()
      Returns the document id when protecting by document id.
      Returns:
      the document id when protecting by document id.
    • getAlgorithm

      public ProtectPdfParams.EncryptionAlgorithm getAlgorithm()
      Returns the encryption algorithm.
      Returns:
      the encryption algorithm.
    • getUserPassword

      public String getUserPassword()
      Returns the user password, if provided.
      Returns:
      the user password, if provided.
    • getOwnerPassword

      public String getOwnerPassword()
      Returns the owner password, if provided.
      Returns:
      the owner password, if provided.
    • getDisablePrint

      public Boolean getDisablePrint()
      Returns whether printing is disabled.
      Returns:
      whether printing is disabled.
    • getDisableCopy

      public Boolean getDisableCopy()
      Returns whether copying is disabled.
      Returns:
      whether copying is disabled.
    • getDisableEditing

      public Boolean getDisableEditing()
      Returns whether editing is disabled.
      Returns:
      whether editing is disabled.
    • getEncryptMetadata

      public Boolean getEncryptMetadata()
      Returns whether metadata is encrypted.
      Returns:
      whether metadata is encrypted.
    • getJsonResponse

      public Boolean 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

      public Long getPreSignedUrlExpiresIn()
      Returns the pre-signed URL expiration time in seconds.
      Returns:
      the pre-signed URL expiration time in seconds.
    • getMetadata

      public Object getMetadata()
      Returns metadata to attach to the document.
      Returns:
      metadata to attach to the document.