ImageGear PDF v25.2 - Updated
SetNewSecurityData Method




ImageGear.Formats.Pdf Assembly > ImageGear.Formats.PDF Namespace > ImGearPDFDocument Class : SetNewSecurityData Method
The new security data object to set for document.
This method sets the security data structure for the specified document's new security handler.
Syntax
'Declaration
 
Public Sub SetNewSecurityData( _
   ByVal securityData As ImGearPDFSecurityData _
) 
'Usage
 
Dim instance As ImGearPDFDocument
Dim securityData As ImGearPDFSecurityData
 
instance.SetNewSecurityData(securityData)
public void SetNewSecurityData( 
   ImGearPDFSecurityData securityData
)
public: void SetNewSecurityData( 
   ImGearPDFSecurityData* securityData
) 
public:
void SetNewSecurityData( 
   ImGearPDFSecurityData^ securityData
) 

Parameters

securityData
The new security data object to set for document.
Remarks

The new security handler must have been previously set using SetNewCryptHandler.

Checks the permissions associated with the specified document using the latest permissions format and determines whether the requested operation is allowed for the specified object in the document.

Not all combinations of EncryptMethod, KeyLength and Revision of ImGearPDFSecurityData object are valid. An error is not returned for invalid combinations. Instead, a different valid combination is used to secure the PDF and a warning is added with ImGearErrorCodes.PDF_FAILURE code. The following combinations are valid:

EncryptMethod Revision KeyLength
ImGearPDFStdSecurityMethod.RC4_V2 ImGearPDFRevision.REVISION_3 5
ImGearPDFStdSecurityMethod.RC4_V2 ImGearPDFRevision.REVISION_3 16
ImGearPDFStdSecurityMethod.RC4_V2 ImGearPDFRevision.REVISION_4 16
ImGearPDFStdSecurityMethod.AES_V2 ImGearPDFRevision.REVISION_4 16
ImGearPDFStdSecurityMethod.AES_V3 ImGearPDFRevision.REVISION_5 32
ImGearPDFStdSecurityMethod.AES_V3 ImGearPDFRevision.REVISION_6 32

See Also

Reference

ImGearPDFDocument Class
ImGearPDFDocument Members
ImGearPDFDictionary Class
ImGearPDFSecurityData Class

Is this page helpful?
Yes No
Thanks for your feedback.