Copy link to clipboard
Copied
i know the password , but removing protection is failing
emoveProtectionOperation removeProtectionOperation = RemoveProtectionOperation.CreateNew();
// Set operation input from a source file.
FileRef sourceFileRef = FileRef.CreateFromLocalFile(@"test.docx");
removeProtectionOperation.SetInput(sourceFileRef);
// Set the password for removing security from a PDF document.
removeProtectionOperation.SetPassword("password");
// Execute the operation.
FileRef result = removeProtectionOperation.Execute(executionContext);
Copy link to clipboard
Copied
You are trying to remove a password from a Word doc, not a PDF. That won't work.