View as MarkdownMarkdown
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");
using (Merger merger = new Merger(filePath))
{
merger.AddPassword(addOptions);
merger.Save(filePathOut);
}
We value your opinion. Your feedback will help us improve our documentation.