Applying Security and Permissions

By default, anyone can open, copy, print, and edit PDF files. If your PDF documents contain sensitive information, however, you can encrypt them so that only authorized users can access it.

There is a separate password for the owner of the document and for all other users. The user's access can be selectively restricted to allow only certain operations, such as viewing, printing, or editing the document.

PDF for Silverlight provides a Security property that returns a PdfSecurity object. This object has properties that allow you to specify the owner password (required to change passwords and permissions for the document) and the user password (required to open the document). Additionally, the PdfSecurity object allows you to specify what permissions a regular user should have. For example you may allow users to see the document but not to print or edit it.

To use the PDF for Silverlight security features, simply set the passwords before you save the document. For example:

      Visual Basic

      C#

Save the document using the Save method as explained in the quick start topic, Step 3 of 4: Saving the document.

Note that you can specify permissions and set only the owner password, leaving the user password empty. In this case, anyone will be allowed to open the document, but only the owner will be allowed to change the permissions.

Note also that the encryption scheme used by PDF for Silverlight is public and is not 100% secure. There are ways to crack encrypted PDF documents. The security provided is adequate to protect your documents from most casual attacks, but if your data is truly sensitive you should not rely on PDF encryption alone.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.