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:
LoadOptionsloadOptions=newLoadOptions("mypassword");finalRedactorredactor=newRedactor("protected_sample.docx",loadOptions);try{// Here we can use document instance to perform redactions
redactor.apply(newExactPhraseRedaction("John Doe",newReplacementOptions("[personal]")));redactor.save();}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.