// Specify the passwordLoadOptionsloadOptions=newLoadOptions();loadOptions.setPassword("123");// Constants.ProtectedDocx is an absolute or relative path to your document. Ex: @"C:\Docs\source.docx"try(Metadatametadata=newMetadata(Constants.ProtectedDocx,loadOptions)){// Extract, edit or remove metadata here}
More resources
GitHub examples
You may easily run the code above and see the feature in action in our GitHub examples: