Returns: RedactorChangeLog: Contains the status of the operation and an error message if the operation failed.
Example
importosfromgroupdocs.redactionimportRedactor,RedactionPolicy,RedactionStatusfromgroupdocs.redaction.optionsimportSaveOptionspolicy=RedactionPolicy.load("RedactionPolicy.xml")forfolderin("outbound/done","outbound/failed"):os.makedirs(folder,exist_ok=True)forfile_nameinos.listdir("inbound"):withRedactor(os.path.join("inbound",file_name))asredactor:result=redactor.apply(policy)target_dir="outbound/done"ifresult.status!=RedactionStatus.FAILEDelse"outbound/failed"withopen(os.path.join(target_dir,file_name),"wb")asoutput:redactor.save(output,SaveOptions(rasterize_to_pdf=False))# keep the format
Aliases
These names call apply too, limited to the overloads listed.