fromgroupdocs.redactionimportRedactorfromgroupdocs.redaction.configurationimportRedactorConfigurationfromgroupdocs.redaction.optionsimportSaveOptionsfromgroupdocs.redaction.redactionsimportExactPhraseRedaction,ReplacementOptions# Obtain the singleton configurationconfig=RedactorConfiguration.get_instance()# Extend the .txt format to also handle .dump filestxt_settings=config.find_format(".txt")txt_settings.extension_filter=txt_settings.extension_filter+",.dump"# Define redaction optionsrepl_opt=ReplacementOptions("[redacted]")ex_red=ExactPhraseRedaction("dolor",repl_opt)# Load and redact a document with the new extensionwithRedactor("./sample.dump")asredactor:redactor.apply(ex_red)# Save the redacted documentsave_options=SaveOptions()save_options.add_suffix=Truesave_options.rasterize_to_pdf=Truesave_options.redacted_file_suffix="redacted"result_path=redactor.save(save_options)