Main Features in GroupDocs.Redaction for Python via .NET

Erase Hidden Metadata from DOCX Files with Python

With Python, you can delete hidden metadata from DOCX files using GroupDocs.Redaction for Python via .NET. Keep your files clean and private.

Remove Metadata from Docx Files

GroupDocs.Redaction gives your Python via .NET apps the tools to delete metadata quickly.

  1. Start a Redactor and load your Docx document.
  2. Set up metadata fields for removal.
  3. Apply redaction to clean the hidden content.
  4. Save the final version of the file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr

# Clean up metadata in DOCX files

# Choose metadata entries to remove
redaction = grr.EraseMetadataRedaction(grr.MetadataFilters.ALL)

# Use Redactor to open the document
with gr.Redactor("input.docx") as redactor:

    # Apply redaction and save the file
    result = redactor.apply(redaction)
    redactor.save()
pip install groupdocs-redaction-net
click to copy
copied
More examples Documentation

Secure Every Part of a Document

With GroupDocs.Redaction for Python via .NET, you can clean up text, images, and metadata in multiple file formats. Ideal for privacy and security.

Document Redaction Tools in Action

Text Cleaner

Find and delete names, terms, or any private words.

Cover Images

Hide parts of an image by placing a color overlay.

Metadata Removal

Get rid of hidden document info like author or software details.

Example: Remove Hidden Metadata

Here’s how you can remove Author and Title fields from a DOCX document using redaction.

Python

import groupdocs.redaction as gr
import groupdocs.redaction.options as gro
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Choose to remove the Author field
redaction_author = grr.MetadataSearchRedaction("[A-Za-z0-9 ]+", "GroupDocs Company")
redaction_author.filter = grr.MetadataFilters.AUTHOR

# Choose to remove the Title field
redaction_title = grr.MetadataSearchRedaction(@"[A-Za-z0-9 ]+", "GroupDocs.Redaction Usage")
redaction_title.filter = grr.MetadataFilters.TITLE

# Open the DOCX file
with gr.Redactor("source.docx") as redactor:

    # Run metadata redaction
    redactions = [
      redaction_author,
      redaction_title
    ]
    result = redactor.apply(redactions)

    # Save the clean file
    save_options = gro.SaveOptions()
    save_options.add_suffix = True
    save_options.rasterize_to_pdf = False
    result_path = redactor.save(save_options)
pip install groupdocs-redaction-net
click to copy
copied
More examples Documentation

What is GroupDocs.Redaction for Python via .NET?

GroupDocs.Redaction gives Python developers the ability to erase hidden data in DOCX files. Clean text, visuals, and metadata from documents easily.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Redaction for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Delete Metadata in DOCX with Python

Remove hidden metadata in DOCX files using Python. Great for securing your files before sharing or archiving.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English