Accusoft.PdfXpress7.Net
GetSecurity Method




The Owner password of the Document.
Gets the Security settings of the Document if it's secure, using the specified Owner Password.
Syntax
'Declaration
 
Public Function GetSecurity( _
   ByVal ownerPassword As String _
) As Security
'Usage
 
Dim instance As Document
Dim ownerPassword As String
Dim value As Security
 
value = instance.GetSecurity(ownerPassword)
public Security GetSecurity( 
   string ownerPassword
)
public: Security* GetSecurity( 
   string* ownerPassword
) 
public:
Security^ GetSecurity( 
   String^ ownerPassword
) 

Parameters

ownerPassword
The Owner password of the Document.

Return Value

The Security settings of the Document.
Exceptions
ExceptionDescription
PdfXpressException Security has already been removed or Security has been recently added to the Document, and it must be saved first.
InvalidOwnerPasswordExceptionThe Owner Password specified is incorrect. Note: If Security Settings are to be modified, once complete the document should be immediately saved and disposed of before being opened again or before the saved document is opened.
Remarks

If the Document lacks Security, this returns null. If the Owner Password is incorrect an InvalidOwnerPasswordException will be thrown.

If an Empty String is used for the Owner Password, the Security.IsEditable property should be checked afterwards to determine if the Security settings returned can be modified.

Documents with Security Settings but no actual Owner Password specified are possible, in this case an Empty String should be used as the specified parameter and the Security.IsEditable property should be checked afterwards.

Note: If security can't be modified, then the Owner Password will be unavailable.

See Also

Reference

Document Class
Document Members

 

 


©2018. Accusoft Corporation. All Rights Reserved.

Send Feedback