IsOwnerPassword

Security and signatures

Description

Reports with which credential the selected document was opened. An encrypted PDF accepts either the user password, which grants only the actions allowed by the /P permission word, or the owner password, which grants full access

The call returns 1 only when the document was authenticated with the owner (full permissions) credential; it returns 0 when the user password was used, when the document is not encrypted, or when no document is loaded

Syntax

Delphi

Function TPDFlib.IsOwnerPassword: Integer;

Return values

0The document was opened with the user password, is not encrypted, or no document is loaded
1The document was opened with the owner (full permissions) credential

Remarks

Gate owner-only workflows on this flag; a document opened with the user password may still forbid printing, changing, or copying content, so inspect GetUserPermissions before relying on a 0 result

See also

IsEncrypted, GetUserPermissions, GetEncryptionLevel, CheckPassword