What You Can Do with GroupDocs.Redaction for Python via .NET

Edit or Remove Private Text in PPTX Files with Python

Use GroupDocs.Redaction for Python via .NET and Python to find and clean sensitive data in your PPTX documents. Keep your personal or work files private.

How to Redact Text in Pptx Documents

Use GroupDocs.Redaction for Python via .NET in your Python via .NET environment to hide or remove sensitive content fast.

  1. Create a Redactor and load your Pptx file.
  2. Choose your redaction settings.
  3. Enter the text to search and what to replace it with.
  4. Apply the redaction and save your updated file.
import groupdocs.redaction as gr
import groupdocs.redaction.redactions as grr

# How to redact text in a PPTX file

# Set your redaction options
# Choose the text to find and what to replace it with
repl_opt = grr.ReplacementOptions("[redacted]")
        
redaction = grr.ExactPhraseRedaction("Text to hide", repl_opt)

# Use the Redactor constructor to load your file
with gr.Redactor("input.pptx") as redactor:

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

More Redaction Features

GroupDocs.Redaction for Python via .NET helps you remove or hide sensitive data across different formats. Share documents safely.

Redaction features overview

Replace private text

Search for and swap out specific words or phrases. Works with regex and smart filters.

Cover private images

Overlay or hide specific areas in images. Customize settings like colors and layout.

Remove hidden info

Clean up metadata such as author names, timestamps, or internal notes.

Redact by Pattern with Regex

Use regular expressions to search and clean up text like email addresses, phone numbers, or IDs.

Python

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

# Set an EMAIL regex pattern and replacement text
repl_opt = grr.ReplacementOptions(color)
emailRegex = "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}"

redaction = grr.RegexRedaction(emailRegex, repl_opt)

# Open the file you want to edit
with gr.Redactor("source.pptx") as redactor:

    # Run the redaction process
    result = redactor.apply(redaction)

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

Meet GroupDocs.Redaction for Python via .NET

GroupDocs.Redaction for Python via .NET gives Python developers full control over PPTX content. Clean up text, images, notes, and metadata 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.

Redact Content in PPTX Using Python

With Python, you can remove sensitive text from PPTX documents and keep your data safe.

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