Features of GroupDocs.Redaction for Python via .NET

Mask Private Images in PPTX Documents with Python

Protect sensitive visuals in PPTX files using Python. Our tools make redacting images simple and fast.

Safeguard Sensitive Data in Pptx Files

GroupDocs.Redaction for Python via .NET helps Python via .NET apps protect documents by covering sensitive content.

  1. Create a Redactor instance and load the Pptx file.
  2. Set redaction options according to your task.
  3. Select the image area and assign an overlay color.
  4. Apply the overlay and save the file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr
import groupdocs.pydrawing as grd

# Mask private image regions in PPTX

# Set 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)

# Mark area to redact
replacement_point = grd.Point(200, 200)
redaction = grr.ImageAreaRedaction(replacement_point, replacement_options)
        
# Open document with Redactor
with gr.Redactor("input.pptx") as redactor:

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

Features for Document Redaction

GroupDocs.Redaction for Python via .NET allows you to hide or remove confidential data in many document types. Keep your files clean and protected.

Full Range of Redaction Tools

Search and Replace Text

Find sensitive text and redact it to protect your information.

Mask Image Areas

Cover images or specific sections with overlays to hide private visuals.

Clean Metadata

Delete or change hidden metadata to avoid exposing private data.

Cover Image Content with Colored Overlays

See how to mask sensitive image parts 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

# Define overlay properties: size, location, color
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)

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

# Load the document
with gr.Redactor("source.pptx") as redactor:

    # Overlay the selected area
    result = redactor.apply(redaction)

    # Save the protected 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 gives Python developers simple tools to hide or erase content in PPTX files. Redact text, images, and metadata across various 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.

Mask Content in PPTX Files with Python

Use Python to hide or delete private content in PPTX files. A dependable tool for document security.

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