Property EnforcePermissions
EnforcePermissions
Gets or sets a value indicating whether permission flags in an encrypted PDF are enforced against the caller. Default: false.
public bool EnforcePermissions { get; set; }
Property Value
Remarks
Off by default, and that is a decision rather than an omission. The /P
permission bits are advisory: the specification (ISO 32000-1 7.6.3.2) makes honouring
them a matter of "conforming reader" policy, and they are unenforceable by
construction, because anyone holding the file also holds the key that decrypts it. A
library that silently refused to rasterize a document its caller had legitimately
decrypted would be pretending to a guarantee it cannot make.
Turned on, a document whose permissions deny content extraction or printing raises UnsupportedFeatureException rather than rendering — which is what a host that must demonstrate it respects the flags wants. Opening with the owner password bypasses the check, as the format intends.