Core Features of GroupDocs.Redaction for Python via .NET

Cover Private Images in WORD Files Using Python

Keep personal and business visuals safe in WORD documents with Python. Simple and fast redaction tools you can rely on.

Secure Sensitive Information in Word Files

GroupDocs.Redaction for Python via .NET helps your Python via .NET apps protect documents by covering private content with overlays.

  1. Create a Redactor object and load the Word file.
  2. Adjust redaction settings as needed.
  3. Select the image area and set overlay color.
  4. Apply the overlay and save the redacted file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Cover sensitive image parts in WORD

# Specify overlay color and size
replacement_size = grd.Size(100, 100)
color = grd.Color.from_argb(255, 220, 20, 60)
replacement_options = grr.RegionReplacementOptions(color, replacement_size)

# Choose image area to hide
replacement_point = grd.Point(200, 200)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)
        
# Load file using Redactor
with gr.Redactor("input.docx") as redactor:

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

Advanced Redaction Features

GroupDocs.Redaction for Python via .NET lets you hide or delete sensitive content in multiple document formats. Keep files clean and safe for sharing.

All-in-One Redaction Toolkit

Search and Replace Text

Find sensitive text across documents and replace it to ensure privacy.

Overlay Images

Cover selected image areas or entire visuals to hide private information.

Remove Metadata

Delete hidden metadata to prevent sharing invisible data.

Cover Image Content with Overlays

This example shows how to hide sensitive images in documents using overlays.

Python

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

# Set overlay dimensions, color, and location
replacement_size = grd.Size(300, 30)
color = grd.Color.from_argb(255, 220, 20, 60)
replacement_options = grr.RegionReplacementOptions(color, replacement_size)
replacement_point = grd.Point(20, 125)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)

# Select area on the first page to cover
redaction.filters = [
    grr.PageRangeFilter(grr.PageSeekOrigin.BEGIN, 0, 1),
    grr.PageAreaFilter(grd.Point(0, 300), grd.Size(600, 600))
]

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

    # Apply overlay redaction
    result = redactor.apply(redaction)

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

About GroupDocs.Redaction for Python via .NET

GroupDocs.Redaction for Python via .NET provides Python developers with simple tools to hide or erase content from WORD files. Protect sensitive text, images, and metadata in different document formats.
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.

Redact Content in WORD Using Python

Python lets you hide or remove sensitive content in WORD files. A trusted solution for document safety.

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