Product Page | Docs | Free Web Demo | API Reference | Blog | Search | Free Support | Temporary License
GroupDocs.Redaction for Python via .NET is a powerful tool for protecting sensitive information in business files across many formats. It lets you redact text, images, metadata, annotations, and other hidden data to keep your documents secure.
- Remove sensitive or confidential information from 30+ different file formats.
- Remove document metadata, comments and annotations.
- Make a rasterized PDF version of the redacted document for better security.
- Keep the document in its original format after the redaction process.
- Set the redaction scope to a specific worksheet or column.
- Modify compliance level from PDF/A-1b to PDF/A-1a during rasterizing PDF.
Text: Hide or replace text in a document body with a colored overlay.
Image: Cover selected areas of an image with a solid color.
Metadata: Clear or replace metadata values.
Annotation: Remove or redact annotations.
Operation Systems: Windows, Linux, Mac OS
Supported IDE: IDLE, PyCharm, Visual Studio Code
Environment: Python 3.9+ and .Net 6+
-
Set Up Environment: Ensure that Python 3.9 and the .NET 6 runtime (or higher) are installed on your system.
-
Get the Code: Clone or download this repository.
git clone https://github.com/groupdocs-redaction/GroupDocs.Redaction-for-Python-via-.NET.git
-
Navigate to the
ExamplesFoldercd GroupDocs.Redaction-for-Python-via-.NET\Examples
-
Install Package: To install the package, run
pip install groupdocs-redaction-net. If you need to use a different package version, you can update the requirements.txt file accordingly.Alternatively, you can download the
whlfile for your operating system from the official GroupDocs Releases website. To install the package manually, copy the whl file to theExamplesdirectory and run the following command:pip install groupdocs_redaction_net-*.whl -
Configure License (Optional): If you have a license file, you can set the license path in the
utils.pyfile. By default, GroupDocs.Conversion for Python via .NET checks for theGROUPDOCS_REDACTION_PYTHON_LICenvironment variable. You can also get a temporary license to test all the features. -
Run the Examples: To run all the examples, execute the following command:
python Examples\run_examples.pyYou can also run individual examples by navigating to the folder containing the example script and running it. Output files are placed in the same folder as the script files.
-
Check results: Redacted files are saved in the
Examples\Outputfolder.
# Specify the redaction options
case_sensitive = True
repl_opt = grr.ReplacementOptions("[personal]")
ex_red = grr.ExactPhraseRedaction("John Doe", case_sensitive, repl_opt)
# Load the document to be redacted
with gr.Redactor(source_file) as redactor:
# Apply the redaction
result = redactor.apply(ex_red) # Specify the redaction options
a_red = grr.AnnotationRedaction("(?im:john)", "[redacted]")
# Load the document to be redacted
with gr.Redactor(source_file) as redactor:
# Apply the redaction
result = redactor.apply(a_red)Product Page | Docs | Free Web Demo | API Reference | Blog | Search | Free Support | Temporary License
