Save in original format

The following example demonstrates how to save file in its original format with current date as a suffix:

final Redactor redactor = new Redactor("sample.docx");
    // Here we can use document instance to perform redactions
    redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]")));
    SaveOptions saveOptions = new SaveOptions();
    saveOptions.setRedactedFileSuffix(new SimpleDateFormat("dd-MM-yyyy").format(new Date()));
    // Saving in original format with date as DateTime.getNow().toShortDateString()a suffix;
finally { redactor.close(); }