Password protect PDF
protect_pdfSave a password-protected copy of a PDF using AES-256 encryption so it requires a password to open, while leaving the original file unchanged.
Instructions
Save a password-protected copy of a PDF, encrypted with AES-256, so it needs that password to open. Use unlock_pdf for the reverse. Returns the saved path; the original file is left unprotected and unchanged. Give the current password if the PDF is already encrypted.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"new_password": "<new_password>"
},
"name": "protect_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the file (absolute, or relative to the working directory). | |
| output | No | Where to save the result. Defaults to a new file next to the input. | |
| password | No | The PDF's current password, if it has one. | |
| new_password | Yes | The password to set. |