DocumentFormatConfiguration class
Leave feedback
On this page
Represents a type reference for DocumentFormatInstance-derived class and supported file extensions list for faster format detection.
Learn more
- More details about GroupDocs.Redaction configuration: https://docs.groupdocs.com/redaction/python-net/extend-supported-extensions-list/
The DocumentFormatConfiguration type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of DocumentFormatConfiguration class. |
| Method | Description |
|---|---|
| supports_extension | Checks if a given file extension can be handled as DocumentType. |
| Property | Description |
|---|---|
| document_type | The type of a class inheriting from DocumentFormatInstance. |
| extension_filter | The comma‑separated list of file extensions (e.g., “.pdf”), case‑insensitive, used to filter supported formats. |
| initialization_data | The data required for DocumentFormatInstance initialization. |
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.