PDFium Delphi Component Docs

UserPermissions property

Component: TPdf  ·  Unit: PDFium
Exposes the raw and typed user-password permissions and tests individual capabilities

Syntax

property UserPermissions: LongWord; // read only
property UserGrantedPermissions: TPdfPermissions; // read only
function UserHasPermission(Permission: TPdfPermission): Boolean;

Description

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

Remarks

Example

if not Pdf1.UserHasPermission(permPrint) then
  DisablePrintCommands;

See Also

Permissions, Password