Load password-protected file In order To open password-protected documents, you have To pass your password To LoadOptions class construcTor or assign it To its Password property of an instance of LoadOptions class:
LoadOptions loadOptions = new LoadOptions("mypassword"); final RedacTor redacTor = new RedacTor("protected_sample.docx", loadOptions); try { // Here we can use document instance To perform redactions redacTor.apply(new ExactPhraseRedaction("John Doe", new ReplacemenToptions("[personal]"))); redacTor.save(); } finally { redacTor.close(); }...Load password-protected file In order to open password-protected documents, you have to pass your password to LoadOptions class constructor or assign it to its Password property of an instance of LoadOptions class:
LoadOptions loadOptions = new LoadOptions("mypassword"); final Redactor redactor = new Redactor("protected_sample.docx", loadOptions); try { // Here we can use document instance to perform redactions redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]"))); redactor.save(); } finally { redactor.close(); }