DocumentFormatInstance class
Leave feedback
On this page
Represents a specific format of a document. Custom document types are implemented in .NET;
from Python, a format handler is reached through RedactorConfiguration.
The DocumentFormatInstance type exposes the following members:
| Method | Description |
|---|---|
| initialize | Performs initialization of the instance of document format handler. |
| is_redaction_accepted | Checks for IRedactionCallback implementation and invokes it, if specified. |
| load | Loads the document from a stream. |
| perform_binary_check | Checks if the given stream contains a document supported by this format instance. |
| save | Saves the document to a stream. |
| Property | Description |
|---|---|
| password | The password for password-protected documents. |
from groupdocs.redaction.configuration import RedactorConfiguration
# Open .dump files with the plain-text format handler
config = RedactorConfiguration.get_instance()
text_format = config.find_format(".txt") # a DocumentFormatConfiguration
text_format.extension_filter = text_format.extension_filter + ",.dump"
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.