Open pdf Documents

Open pdf Documents

Forum member · Jun 8, 2018
Hello, is it possible to open a document encrypt this pdf-doc and save it with a new name I thought I read something like this, but I can't find it. -bernhard

Re: Open pdf Documents

Support · Jun 8, 2018
Hello, Yes, you can dynamically load the PDF, encrypt it and save the final output PDF with desired name using DynamicPDF Merger product. Please refer to the documentation on security here . Also below is the code sample. //Load the PDF. PdfDocument pdf = new PdfDocument(@"Path for PDF document"); MergeDocument document = new MergeDocument(pdf); //Encrypt the PDF using security classes. Aes128Security securityObj = new Aes128Security(); securityObj.OwnerPassword = "owner"; securityObj.UserPassword = "user"; document.Security = securityObj; //Save the PDF to disk using desired file name. document.Draw(@"C:\Temp\MyDocument.pdf"); Thanks, ceTe Software Support Team.