Encrypt / inspect PDF security
secure_pdfEncrypt a PDF with passwords, report its encryption status, or verify its digital signatures.
Instructions
Encrypt a PDF, report its encryption status, or verify its signatures.
Returns JSON per operation: encrypt→{status, operation, page_count, note}; permissions→{path, is_encrypted, unlocked, permissions}; verify_signatures→ {path, signatures, signature_count}. 'permissions' and 'verify_signatures' are read-only; 'encrypt' writes output_path (overwriting).
Caveat: 'encrypt' rebuilds the document from its text, preserving content and layout but possibly dropping images, embedded fonts and vector graphics (the current API has no in-place encryption). To encrypt a PDF you are authoring, pass the passwords to save_pdf instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | 'encrypt' writes a password-protected copy; 'permissions' reports encryption status; 'verify_signatures' checks digital signatures. Only 'encrypt' writes a file. | |
| input_path | No | Source PDF. Required for all three operations. | |
| output_path | No | Destination .pdf for the encrypted copy (overwritten if present). Required for 'encrypt'; unused otherwise. | |
| user_password | No | Open password for the encrypted copy. Required for 'encrypt'. | |
| owner_password | No | Owner/permissions password. Required for 'encrypt'. | |
| password | No | Password used to unlock the file when checking 'permissions' on an encrypted PDF. Unused by other operations. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |