Package com.pdfgate

Class ProtectPdfParams.Builder

java.lang.Object
com.pdfgate.ProtectPdfParams.Builder
Enclosing class:
ProtectPdfParams

public static final class ProtectPdfParams.Builder extends Object
Builder for ProtectPdfParams.
  • Method Details

    • documentId

      public ProtectPdfParams.Builder documentId(String documentId)
      Sets the document id for the source PDF.
      Parameters:
      documentId - the document id for the source PDF.
      Returns:
      this builder.
    • algorithm

      Sets the encryption algorithm.
      Parameters:
      algorithm - encryption algorithm.
      Returns:
      this builder.
    • userPassword

      public ProtectPdfParams.Builder userPassword(String userPassword)
      Sets the user password required to open the PDF.
      Parameters:
      userPassword - user password required to open the PDF.
      Returns:
      this builder.
    • ownerPassword

      public ProtectPdfParams.Builder ownerPassword(String ownerPassword)
      Sets the owner password with full control.
      Parameters:
      ownerPassword - owner password with full control.
      Returns:
      this builder.
    • disablePrint

      public ProtectPdfParams.Builder disablePrint(Boolean disablePrint)
      Disables printing when set to true.
      Parameters:
      disablePrint - whether printing is disabled.
      Returns:
      this builder.
    • disableCopy

      public ProtectPdfParams.Builder disableCopy(Boolean disableCopy)
      Disables copying when set to true.
      Parameters:
      disableCopy - whether copying is disabled.
      Returns:
      this builder.
    • disableEditing

      public ProtectPdfParams.Builder disableEditing(Boolean disableEditing)
      Disables editing when set to true.
      Parameters:
      disableEditing - whether editing is disabled.
      Returns:
      this builder.
    • encryptMetadata

      public ProtectPdfParams.Builder encryptMetadata(Boolean encryptMetadata)
      Encrypts metadata when set to true.
      Parameters:
      encryptMetadata - whether to encrypt metadata.
      Returns:
      this builder.
    • preSignedUrlExpiresIn

      public ProtectPdfParams.Builder preSignedUrlExpiresIn(Long preSignedUrlExpiresIn)
      Sets the pre-signed URL expiration time in seconds.
      Parameters:
      preSignedUrlExpiresIn - expiration time in seconds.
      Returns:
      this builder.
    • metadata

      public ProtectPdfParams.Builder metadata(Object metadata)
      Sets metadata to attach to the document.
      Parameters:
      metadata - metadata to attach to the document.
      Returns:
      this builder.
    • build

      public ProtectPdfParams build()
      Builds protect PDF parameters for JSON responses.
      Returns:
      parameters configured for JSON responses.