Skip to main content
Known Participant
May 28, 2024 12:13 PM UTC
Question

Document is Protected - How do I Enter Permissions Password?

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);

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Raymond Camden
    Community Manager
    Community Manager
    May 28, 2024 1:04 PM UTC

    You are trying to remove a password from a Word doc, not a PDF. That won't work.

    Translate