Class PdfDocumentPermissions
What the reader may do with an encrypted document (ISO 32000-2 7.6.4.2, Table 22), resolved for the way it was opened: the owner password (or a public-key recipient granted everything) lifts every restriction. For revision 2, the flags that revision 3 introduced (bits 9–12) follow the older bits they refine.
public sealed record PdfDocumentPermissions : IEquatable<PdfDocumentPermissions>
- Inheritance
-
PdfDocumentPermissions
- Implements
- Inherited Members
Constructors
PdfDocumentPermissions(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool)
What the reader may do with an encrypted document (ISO 32000-2 7.6.4.2, Table 22), resolved for the way it was opened: the owner password (or a public-key recipient granted everything) lifts every restriction. For revision 2, the flags that revision 3 introduced (bits 9–12) follow the older bits they refine.
public PdfDocumentPermissions(bool IsEncrypted, bool Unrestricted, bool CanPrint, bool CanPrintHighQuality, bool CanModify, bool CanCopy, bool CanAnnotate, bool CanFillForms, bool CanExtractForAccessibility, bool CanAssemble)
Parameters
IsEncryptedboolUnrestrictedboolCanPrintboolCanPrintHighQualityboolCanModifyboolCanCopyboolCanAnnotateboolCanFillFormsboolCanExtractForAccessibilityboolCanAssemblebool
Fields
Owner
Encrypted but opened with full rights.
public static readonly PdfDocumentPermissions Owner
Field Value
Unencrypted
An unencrypted document: everything is allowed.
public static readonly PdfDocumentPermissions Unencrypted
Field Value
Properties
CanAnnotate
public bool CanAnnotate { get; init; }
Property Value
CanAssemble
public bool CanAssemble { get; init; }
Property Value
CanCopy
public bool CanCopy { get; init; }
Property Value
CanExtractForAccessibility
public bool CanExtractForAccessibility { get; init; }
Property Value
CanFillForms
public bool CanFillForms { get; init; }
Property Value
CanModify
public bool CanModify { get; init; }
Property Value
CanPrint
public bool CanPrint { get; init; }
Property Value
CanPrintHighQuality
public bool CanPrintHighQuality { get; init; }
Property Value
IsEncrypted
public bool IsEncrypted { get; init; }
Property Value
RestrictionSummary
A short, human description of what is restricted, or empty when nothing is.
public string RestrictionSummary { get; }
Property Value
Unrestricted
public bool Unrestricted { get; init; }
Property Value
Methods
FromFlags(int, int, bool)
Resolves /P (bit numbers are 1-based as in Table 22) for a security handler revision.
public static PdfDocumentPermissions FromFlags(int p, int revision, bool unrestricted)