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.
Unfortunately, activation email could not send to your email. Please try again.

How to tell if document is encrypted

Thread ID:

Created:

Updated:

Platform:

Replies:

108911 May 20,2013 10:19 AM May 22,2013 01:19 AM Silverlight 1
loading
Tags: PDF
Brent Snyder
Asked On May 20, 2013 10:19 AM

How can I tell if a document is encrypted?  I need to know to be able to prompt my user for a password.

Praveenkumar H [Syncfusion]
Replied On May 22, 2013 01:19 AM

Hi Brent,

Thank you for using Syncfusion products,

We can add the security settings to the document as follow.

PdfDocument doc=new PdfDocument();
// Set encryption key. 
doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit; 
doc.Security.Algorithm = PdfEncryptionAlgorithm.AES;
// Setting username and password to protect the document. 
doc.Security.OwnerPassword = "syncfusion"; 
doc.Security.UserPassword = "password"; 
// Allow print with full quality. 
doc.Security.Permissions = PdfPermissionsFlags.Print | PdfPermissionsFlags.FullQualityPrint; 
doc.Save("sample.pdf");

Please visit the below link for more information about the Pdf security.


Please let us know if you have any concern,

With Regards,
Praveen



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;