Hi,
I have PDFs with owner password, I have the password but now I have to remove these passwords, what options I have?
My initial thinking is on this line - there is no way to remove the passwords from the pdf, so I thought of opening this document and creating new document from them by using Document and PdfDocument classes but how to transfer the pages?
Thanks for any hint/help
cheers,
Deleting or Removing the Password
Re: Deleting or Removing the Password
Support · Aug 16, 2007Hello,
In order to remove the password of an existing PDF document you will have to create a PdfDocument object using the password and the path of the PDF document and then create a MergeDocument object using the PdfDocument. Save the PDF to disk. The saved PDF will not have any password. Following is the code for this.
PdfDocument pdf = new PdfDocument(@"C:\Temp\Security.pdf", "pwd");
MergeDocument document = new MergeDocument(pdf);
document.Draw(@"C:\Temp\NoSecurity.pdf");
Thanks,
ceTe Software Support Team.