GroupDocs.Redaction for Python via .NET is a document redaction API that permanently removes sensitive or classified content from documents across many formats. It provides a unified, format-independent interface to redact text by exact phrase or regular expression, scrub or rewrite metadata, black out image areas, rewrite or delete annotations, and remove pages — then save the result in its original format or as a rasterized PDF so redacted content cannot be recovered.
Quick example
fromgroupdocs.redactionimportRedactorfromgroupdocs.redaction.redactionsimportExactPhraseRedaction,ReplacementOptions# Redact every occurrence of "Emily Johnson" and save the result as a rasterized PDFwithRedactor("sample.docx")asredactor:redactor.apply(ExactPhraseRedaction("Emily Johnson",ReplacementOptions("[personal]")))redactor.save()
Features
Text Redaction: Replace or hide text matched by an exact phrase (case-sensitive or RTL-aware) or a regular expression, with a replacement string or a colored box.
Text in Images: Redact text in scans and embedded images through the OCR engine of your choice, such as Tesseract.
Metadata Redaction: Erase or rewrite document metadata, wholesale or filtered by property.
Image & Annotation Redaction: Black out image areas, clean embedded image metadata, and rewrite or delete annotations.
Page Removal & Rasterization: Remove pages or page ranges, and optionally flatten the result to a rasterized PDF (with PDF/A compliance) so redacted content is unrecoverable.
Redaction Policies: Describe a reusable set of redactions as a policy and apply it across many documents.
Review and Previews: Approve or reject each match in a callback, log what the engine does, and render page previews to images.
Supported File Formats
GroupDocs.Redaction redacts 40+ file formats. For the complete list, and what each redaction does on each format, see the full list of supported formats.
Microsoft Office (Word, Excel, PowerPoint, including templates and macro-enabled files)
For practical, runnable code examples covering basic and advanced redaction, see the Developer Guide section. It walks through loading documents, applying text, metadata, image, annotation, and page redactions, saving and rasterizing results, and building reusable redaction policies.
AI Agents & LLM Integration
Using an AI coding assistant? The AI Agents & LLM Integration page covers the bundled AGENTS.md reference, the GroupDocs MCP server, and machine-readable documentation.
Technical Support
If you experience any issues or have suggestions, see Technical Support for the available channels — the free support forum and the paid helpdesk. For licensing and evaluation questions, see Licensing and Evaluation.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.