function HasPermission(Permission: TPdfPermission): Boolean;
| Permission | TPdfPermission. One of permPrint, permModify, permCopy, permAnnotate, permFillForms, permAccessibility, permAssemble, permPrintHighQuality |
| Result | Boolean. True when the document grants it |
A single-permission form of GrantedPermissions, intended for the common case of gating one operation - enabling a Print command, refusing an extract
The answer comes from the permission bits of the document. PDF permissions are a statement of intent that a conforming viewer honours; they are not enforced by encryption, so an application that must restrict an action still has to do so itself
When the document was opened with the owner password, UserHasPermission reports what a user-password reader would have been allowed instead