pdf_redact
Blacken sensitive content in a PDF by exact terms or PII patterns such as emails, phones, and card numbers, returning the output path and a count of redacted regions.
Instructions
Blacken sensitive content in a PDF by terms and/or PII patterns.
Return Format
A dict with keys:
success: bool
path: str - output PDF path
occurrences: int - number of regions redacted On failure: {success: False, error}.
Examples
await pdf_redact(path="report.pdf", pii=True) {"success": true, "path": ".../report_redact_....pdf", "occurrences": 7}
await pdf_redact(path="report.pdf", terms=["Acme Corp"]) {"success": true, "path": ".../report_redact_....pdf", "occurrences": 3}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pii | No | Redact PII (email, phone, IBAN, card, SSN, IP). Default false. | |
| path | Yes | Path to the PDF file to redact. | |
| terms | No | Exact phrases to blacken. | |
| output_path | No | Output path. Auto-generated if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Human-readable summary | |
| success | No | Whether the operation succeeded |