property UserPermissions: LongWord; // read only
property UserGrantedPermissions: TPdfPermissions; // read only
function UserHasPermission(Permission: TPdfPermission): Boolean;
UserPermissions returns the effective permission mask for the password used to open the document
UserGrantedPermissions decodes that mask into TPdfPermissions, whilst UserHasPermission tests one TPdfPermission value directly
The user and owner permission sets are normally equal when the document is opened with the owner password
GrantedPermissions and HasPermission for the owner-password permission mask
if not Pdf1.UserHasPermission(permPrint) then
DisablePrintCommands;