DocumentFormatInstance class

DocumentFormatInstance class

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:

Methods

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.

Properties

Property Description
password The password for password-protected documents.

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