Skip to content

groupdocs-redaction/GroupDocs.Redaction-for-Python-via-.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Product Page | Docs | Free Web Demo | API Reference | Blog | Search | Free Support | Temporary License

GroupDocs.Redaction for Python via .NET

banner

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.


Document Redaction Features

  • 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.

Supported Redaction Types

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.

Develop & Deploy Anywhere

Operation Systems: Windows, Linux, Mac OS
Supported IDE: IDLE, PyCharm, Visual Studio Code
Environment: Python 3.9+ and .Net 6+

Get Started

  1. Set Up Environment: Ensure that Python 3.9 and the .NET 6 runtime (or higher) are installed on your system.

  2. Get the Code: Clone or download this repository.

     git clone https://github.com/groupdocs-redaction/GroupDocs.Redaction-for-Python-via-.NET.git
  3. Navigate to the Examples Folder

    cd GroupDocs.Redaction-for-Python-via-.NET\Examples
  4. 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 whl file for your operating system from the official GroupDocs Releases website. To install the package manually, copy the whl file to the Examples directory and run the following command:

    pip install groupdocs_redaction_net-*.whl
  5. Configure License (Optional): If you have a license file, you can set the license path in the utils.py file. By default, GroupDocs.Conversion for Python via .NET checks for the GROUPDOCS_REDACTION_PYTHON_LIC environment variable. You can also get a temporary license to test all the features.

  6. Run the Examples: To run all the examples, execute the following command:

    python Examples\run_examples.py

    You 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.

  7. Check results: Redacted files are saved in the Examples\Output folder.

Example: Case-Sensitive Phrase Redaction in DOCX

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

Example: Redact Strings in PDF Annotations

    # 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

About

Document comparison API for Python - GroupDocs.Comparison for Python via .NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •