Posted by a ceTe Software moderator
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.