Aspose::Pdf::Facades::PdfFileSecurity::SetPrivilege method

PdfFileSecurity::SetPrivilege(const System::SharedPtr<DocumentPrivilege>&) method

Sets Pdf file security with empty user/owner passwords. The owner password will be added by a random string. Throws an exception if process failed.

bool Aspose::Pdf::Facades::PdfFileSecurity::SetPrivilege(const System::SharedPtr<DocumentPrivilege> &privilege)
ParameterTypeDescription
privilegeconst System::SharedPtr<DocumentPrivilege>&Set privilege.

ReturnValue

True for success.

See Also

PdfFileSecurity::SetPrivilege(const System::String&, const System::String&, const System::SharedPtr<DocumentPrivilege>&) method

Sets Pdf file security with original password. Throws an exception if process failed.

bool Aspose::Pdf::Facades::PdfFileSecurity::SetPrivilege(const System::String &userPassword, const System::String &ownerPassword, const System::SharedPtr<DocumentPrivilege> &privilege)
ParameterTypeDescription
userPasswordconst System::String&Original user password.
ownerPasswordconst System::String&Original owner password.
privilegeconst System::SharedPtr<DocumentPrivilege>&Set privilege.

ReturnValue

True for success.

See Also