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 "John Doe" in a documentwithRedactor("sample.docx")asredactor:redactor.apply(ExactPhraseRedaction("John Doe",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.
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.
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 Subscription.
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.