![]() |
Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.3.23
|
Leadtools.Pdf Assembly > Leadtools.Pdf Namespace > PDFFile Class : SecurityOptions Property |
public PDFSecurityOptions SecurityOptions {get; set;}
'Declaration
Public Property SecurityOptions As PDFSecurityOptions
'Usage
Dim instance As PDFFile Dim value As PDFSecurityOptions instance.SecurityOptions = value value = instance.SecurityOptions
public: property PDFSecurityOptions^ SecurityOptions { PDFSecurityOptions^ get(); void set ( PDFSecurityOptions^ value); }
The following methods of the PDFFile class will use the security options set in .SecurityOptions when updating or creating a PDF file:
If the value of SecurityOptions is null, then the PDFFile will not encrypt the result PDF file.
There are two different ways to protect a PDF file with a password:
By using a user password set in UserPassword. In this mode, external viewers such as Adobe Acrobat will ask the user for the same password when opening the file for viewing. If the correct password is supplied, then all operations and rights are granted.
By using an owner password set in OwnerPassword. In this mode, external viewers such as Adobe Acrobat will ask the user for the same password when opening the file for viewing. If the correct password is supplied, the editor will check the various access rights properties to allow or disallow certain operations on the PDF file such as printing or editing.
You cannot use both UserPassword and OwnerPassword in the same PDF file. If both values are set, then the PDFFile object will use OwnerPassword and ignore UserPassword.
Similar to the DocumentProperties property, the value of SecurityOptions will not be modified when a PDF file is loaded in this object using the Load method.
To determine whether a PDF file is encrypted and requires a password to view or modify, use the IsEncrypted method.
For an example, refer to PDFSecurityOptions.