Redactor class
Leave feedback
On this page
Represents a main class that controls document redaction process, allowing to open, redact and save documents.
Learn more
- More details about applying redactions: https://docs.groupdocs.com/redaction/net/redaction-basics/
- More advanced redaction topics: https://docs.groupdocs.com/redaction/net/advanced-usage/
The Redactor type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new Redactor instance using a file path. |
| init | Initializes a new instance of Redactor using a stream. |
| init | Initializes a new instance of Redactor for a password‑protected document using its path. |
| init | Initializes a new Redactor instance for a password‑protected document using its path and settings. |
| init | Initializes a new Redactor instance for a password‑protected document using a stream. |
| init | Initializes a new instance of Redactor for a password‑protected document using a stream and settings. |
| Method | Description |
|---|---|
| apply | Applies a redaction to the document. |
| apply | Applies a set of redactions to the document. |
| apply | Applies a redaction policy to the document. |
| apply_redaction | |
| apply_redaction_policy | |
| dispose | Releases resources. |
| generate_preview | Generates preview images of specific pages in a given image format. |
| generate_preview_preview_options | |
| get_document_info | Retrieves the general information about the document, such as size and page count. |
| save | Saves the document to a file with the following options: AddSuffix = True, RasterizeToPDF = True. |
| save | Saves the document to a file. |
| save | Saves the document to a stream, including custom location. |
| save_save_options | |
| save_stream | |
| save_streams |
from groupdocs.redaction import Redactor
from groupdocs.redaction.redactions import RemovePageRedaction, PageSeekOrigin
# Open a document and remove the first page
with Redactor("document.pdf") as redactor:
redactor.apply(RemovePageRedaction(PageSeekOrigin.BEGIN, 0, 1))
redactor.save()
Task guides that use Redactor:
- Hello, World!
- Redaction basics
- Text redaction
- Image redactions
- Metadata redactions
- Annotation redactions
- Spreadsheet redactions
- Remove page redactions
- Use redaction policies
- Get file info
- module
groupdocs.redaction
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.