We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Enable password protected PDF document

Would it be possible that Syncfusion Pdf component allows me set password into the generated PDF document so that the PDF doc only can be opened by authorized person?

Thanks

1 Reply

MW Melba Winshia Syncfusion Team August 29, 2007 02:22 PM UTC

Hi,

Thank you for your interest in Essential PDF.

Yes. It is possible to set password to the generated PDF document by using PDFDocument.Security.UserPassword property.

[C#]


// Set encryption key.
pdfDoc.Security.KeyLength=EncryptionKeyLength.Key128Bit;

To set User/Owner password.
// Setting username and password to protect the document.
pdfDoc.Security.OwnerPassword = "Syncfusion";
pdfDoc.Security.UserPassword = "111";

Please refer to the following shipped browser sample for more details.

C:\Documents and Settings\{user}\My Documents\Syncfusion\EssentialStudio\5.1.0.51\Windows\Pdf.Windows\Samples\2.0\Grid Model\Security\EncryptionSupport\cs

Please try this and let me know if this helps.

Thanks,
Melba


Loader.
Live Chat Icon For mobile
Up arrow icon