Working with encrypted PDF

Working with encrypted PDF

Forum member · Jun 12, 2013
Can I extract pages from an encrypted PDF using the Merger libraries if I know the correct password? Scenario would be creating a file with many pages in one application (such as Acrobat) and encrypting it, then using DynamicPDF libraries to extract selected pages under program control later. Thanks.

Re: Working with encrypted PDF

Support · Jun 13, 2013
Hello, Yes, you can extract pages out of password protected PDF document by using the correct owner password. You can edit the encrypted input PDF document using PdfDocument class constructor which takes input file path and password as string. Then use this PdfDocument object to append the desired pages to the MergeDocument object using Append method. Below is the sample code for it. PdfDocument pdf = new PdfDocument(@"C:\Encrypted.pdf", "ownerpassword"); MergeDocument document = new MergeDocument(); //Extracting the firsrt page of the input PDF document. document.Append(pdf, 1, 1); document.Draw(@"C:\MyDocument.pdf"); Feel free to download fully functional evaluation edition of DynamicPDF Merger for .NET product from our website here . Also refer sample examples downloaded with the product download. Thanks, ceTe Software Support Team.