Class Protection
- Namespace
- Rustaveli.Pdf
- Assembly
- Rustaveli.Pdf.dll
How a PDF is protected by password: what opens it, what lifts its restrictions, what a reader may do with it once open, and how strongly it is encrypted.
public sealed class Protection
- Inheritance
-
Protection
- Inherited Members
Remarks
Restrictions are honoured by readers, not enforced by the encryption: anyone who can open a file can read it. Only a user password keeps a file closed.
Only AesWith256Bits takes a password in any script; the older levels take PDFDocEncoding, roughly Latin-1, and a password with other characters is refused rather than weakened.
Properties
AllowAccessibility
Whether assistive technology may read the content out, even where copying is not allowed. PDF/UA requires it.
public bool AllowAccessibility { get; init; }
Property Value
AllowAnnotating
Whether comments may be added and form fields filled in.
public bool AllowAnnotating { get; init; }
Property Value
AllowAssembling
Whether pages may be inserted, rotated or removed, and bookmarks and thumbnails made.
public bool AllowAssembling { get; init; }
Property Value
AllowCopying
Whether text and images may be copied out.
public bool AllowCopying { get; init; }
Property Value
AllowFillingForms
Whether form fields may be filled in even where annotating is not allowed.
public bool AllowFillingForms { get; init; }
Property Value
AllowHighQualityPrinting
Whether printing is faithful, rather than at the low resolution a reader falls back to.
public bool AllowHighQualityPrinting { get; init; }
Property Value
AllowModifying
public bool AllowModifying { get; init; }
Property Value
AllowPrinting
public bool AllowPrinting { get; init; }
Property Value
EncryptMetadata
Whether the XMP metadata is encrypted too; off lets search engines read it without the password.
public bool EncryptMetadata { get; init; }
Property Value
Encryption
public EncryptionLevel Encryption { get; init; }
Property Value
OwnerPassword
The password that opens the file with every restriction lifted. When none is given one no one knows is made up, so the restrictions cannot be lifted at all.
public string? OwnerPassword { get; init; }
Property Value
UserPassword
The password that opens the file; empty, the default, opens it without asking.
public string UserPassword { get; init; }