PDFium Delphi Component Docs

Permissions property

Component: TPdf  ·  Unit: PDFium
Exposes raw and typed owner-password permissions and tests individual capabilities without manual bit masks

Syntax

property Permissions: LongWord; // read only
property GrantedPermissions: TPdfPermissions; // read only
function HasPermission(Permission: TPdfPermission): Boolean;

Description

Permissions returns the owner-password permission mask decoded by PDFium from the /Encrypt dictionary

GrantedPermissions maps the standard PDF permission bits to a TPdfPermissions set containing permPrint, permModify, permCopy, permAnnotate, permFillForms, permAccessibility, permAssemble and permPrintHighQuality

HasPermission tests one of those values directly

Remarks

Example

if Pdf1.HasPermission(permCopy) then
  EnableCopyCommands;

See Also

UserPermissions, Password