DocumentFormatConfiguration class

DocumentFormatConfiguration class

Represents a type reference for DocumentFormatInstance-derived class and supported file extensions list for faster format detection.

Learn more

The DocumentFormatConfiguration type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of DocumentFormatConfiguration class.

Methods

Method Description
supports_extension Checks if a given file extension can be handled as DocumentType.

Properties

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.

Example

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"

See Also