Decrypt a PDF
decrypt_pdfDecrypt an encrypted PDF by providing the user or owner password. Outputs an unencrypted copy, but note that signatures and AcroForm are dropped.
Instructions
Open an encrypted PDF (pdfnative v1.6.0 reader/decryptor — RC4 V1–V4, AES-128 V4/R4, AES-256 V5/R6) and emit an UNENCRYPTED copy. Pass password (user or owner); documents with an empty user password decrypt without one. CAVEAT: decryption rebuilds the page tree, so existing signatures and the interactive AcroForm are DROPPED and only self-contained URI links are kept. To READ an encrypted PDF without rebuilding it, pass password directly to inspect_pdf / extract_text / extract_attachments instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | No | Password to open the encrypted source (user or owner). Omit only for documents with an empty user password. | |
| pdfBase64 | Yes | Base64-encoded encrypted PDF to decrypt. NOTE: signatures and AcroForm are dropped (page-tree rebuild). | |
| outputMode | No | base64 | |
| outputPath | No | Required when outputMode='file'. Relative path inside the sandbox; must end with .pdf. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| filePath | No | Absolute sandboxed file path (when mode='file'). | |
| sizeBytes | Yes |