PDFium Delphi Component Docs

UserHasPermission method

Component: TPdf  ·  Unit: PDFium
Test one permission against the rights a user-password reader would receive

Syntax

function UserHasPermission(Permission: TPdfPermission): Boolean;

PermissionTPdfPermission. One of permPrint, permModify, permCopy, permAnnotate, permFillForms, permAccessibility, permAssemble, permPrintHighQuality
ResultBoolean. True when a user-password reader would be granted it

Description

The user-level counterpart of HasPermission, reading from UserGrantedPermissions

On a document opened with the user password, or on an unencrypted one, both methods agree. They diverge only when the owner password was supplied

This is the check to use when an application wants to behave the way an ordinary reader would, regardless of the password it happened to open the file with

See Also

HasPermission, UserGrantedPermissions, UserPermissions