# Add a password to a PDF

Encrypt a PDF so it requires a password to open, in a Zap. Connect the PDF Blocks app once: no code, and no document is stored after the Zap runs.

Use this action to add a password to a PDF document, encrypting it so it
can only be opened by someone who knows the password.

## Input

<ParamField name="PDF Document" type="file" required>
  The content of the input PDF document.
</ParamField>

<ParamField name="Password" type="string" required>
  The password required to open the file. Must be between 4 and 32
  characters. Characters must fall within the ASCII printable range
  (positions 32–126), which includes letters, numbers, spaces, and common
  symbols such as periods, colons, and mathematical operators.
</ParamField>

<ParamField name="Encryption Algorithm" type="string" required>
  The encryption method to use. One of `AES-128` or `AES-256`. We
  recommend using AES-128 as it strikes a balance between security and
  compatibility.
</ParamField>

## Output

<ParamField name="File" type="file">
  A file with the password-protected PDF document. You can use it as input
  to other steps in your zap.
</ParamField>
