The following example demonstrates how to save file in its original format with current date as a suffix:
finalRedactorredactor=newRedactor("sample.docx");try{// Here we can use document instance to perform redactions
redactor.apply(newExactPhraseRedaction("John Doe",newReplacementOptions("[personal]")));SaveOptionssaveOptions=newSaveOptions();saveOptions.setAddSuffix(true);saveOptions.setRasterizeToPDF(false);saveOptions.setRedactedFileSuffix(newSimpleDateFormat("dd-MM-yyyy").format(newDate()));// Saving in original format with date as DateTime.getNow().toShortDateString()a suffix
redactor.save(saveOptions);}finally{redactor.close();}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.