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

PdfFileSecurity::SetPrivilege(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(System::SharedPtr<DocumentPrivilege> privilege)
ParameterTypeDescription
privilegeSystem::SharedPtr<DocumentPrivilege>Set privilege.

ReturnValue

True for success.

See Also

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

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

bool Aspose::Pdf::Facades::PdfFileSecurity::SetPrivilege(System::String userPassword, System::String ownerPassword, System::SharedPtr<DocumentPrivilege> privilege)
ParameterTypeDescription
userPasswordSystem::StringOriginal user password.
ownerPasswordSystem::StringOriginal owner password.
privilegeSystem::SharedPtr<DocumentPrivilege>Set privilege.

ReturnValue

True for success.

See Also