Remove the Password protection from PDF

Dear support,
Is it possible to remove the password protection if I only have Opening password instead of Owner Password.
Right now I can do with the following ways.

  1. opening the PDF in Acrobat with User/Open Password and Print through Adobe PDF printer.
  2. Opening the PDF in Chrome/Firefox Browser and Print from the Browser.

If you have any other ways, please let me know and also is it possible to remove the protection using Aspose.PDF/Aspose.Word.

Please let me know your suggestions.
Thanks
Patrick

@patrickjjs

Thank you for contacting support.

You can remove password protection from a PDF document if you only have the user or open password by using below code snippet in your environment.

// Open document
Document document = new Document(dataDir + "Encrypt_out.pdf", "UserPasswordHere");
// Decrypt PDF
document.Decrypt();
dataDir = dataDir + "Decrypt_out.pdf";
// Save updated PDF
document.Save(dataDir);

We hope this will be helpful. Please feel free to contact us if you need any further assistance.