Add document password

GroupDocs.Merger allows to add document password. Here are the steps to add document password:

The following code sample demonstrates how to add document password.

String filePath = "c:\sample.pptx";
String filePathOut = "c:\output\result.pptx";

AddPasswordOptions addOptions = new AddPasswordOptions("SAMPLE_PASSWORD");

Merger merger = new Merger(filePath);        
merger.addPassword(addOptions);
merger.save(filePathOut);