Skip to main content
Known Participant
May 28, 2024
Question

Converting protected docx file (how to bypass the password)

  • May 28, 2024
  • 1 reply
  • 442 views

Im getting this error when converting docx to pdf , the docx is protected and i know the password, so i want to bypass the password before converting.{"Source file is protected and cannot be processed.; requestId=48671aa7-a481-47d8-a707-2d980edffd2d"}

    This topic has been closed for replies.

    1 reply

    Known Participant
    May 28, 2024

    I have tried this but didnt work

    emoveProtectionOperation removeProtectionOperation = RemoveProtectionOperation.CreateNew();
    FileRef sourceFileRef = FileRef.CreateFromLocalFile(@"test.docx");
    removeProtectionOperation.SetInput(sourceFileRef);removeProtectionOperation.SetPassword("password");FileRef result = removeProtectionOperation.Execute(executionContext);

    Raymond Camden
    Community Manager
    Community Manager
    May 28, 2024

    As I said in the other thread I believe you opened, you can't use our API to remove a password from a Word document.