Features of GroupDocs.Redaction for Python via .NET

Remove Metadata in WORD Using Python Tools

Keep your files safe by deleting unwanted metadata with Python. Perfect for companies and individual users.

Remove Hidden Metadata in Word

With GroupDocs.Redaction, your Python via .NET app can quickly clean document metadata.

  1. Create a Redactor object and open the Word file.
  2. Set redaction rules for the metadata fields.
  3. Run the redaction to remove selected data.
  4. Save the cleaned version of the file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr

# Clean metadata in WORD

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

# Open the document using Redactor
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

Protect More Than Just Metadata

Redact text, cover images, and remove metadata using GroupDocs.Redaction for Python via .NET. Keep your documents clean and private.

Document Protection Options

Find and Replace Text

Delete or replace words and phrases that contain private or sensitive data.

Add Image Covers

Place overlays to hide parts of images in your documents.

Clear Out Metadata

Clean author names, titles, comments, and other hidden info.

Remove Metadata from WORD Files

This example shows how to remove fields like Author and Title from a WORD document.

Python

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

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

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

# Import your document
with gr.Redactor("source.docx") as redactor:

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

    # Save the updated 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

Meet GroupDocs.Redaction for Python via .NET

GroupDocs.Redaction is made for Python developers who want to keep WORD files private. It lets you remove text, hide parts of images, and clean metadata.
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.

Remove Metadata in WORD with Python

Use Python to clean hidden metadata from WORD. Keep your files safe 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